[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

inlining yaml

Dan Kirkwood

1/11/2007 7:12:00 PM

I want to be able to inline certain parts of yaml output that are
embedded within a structure. Here's the approach I'm taking -- does
it look reasonable? Can anyone recommend a better approach? -dan

require 'yaml'
class Object
def inline!
class << self; def to_yaml_style; :inline; end; end
self
end
end

ary = %w[a b c]
ary.inline!
other = %w[a b c]

puts ({ 'ary' => ary, 'other' => other }).to_yaml
---
ary: [a, b, c]
other:
- a
- b
- c

3 Answers

Yaako Warrior from AUZ, China, RSA, USA, Sweden, Hong Kong, Canada, Russia, China, Denmark, UK, ....

10/12/2007 4:23:00 PM

0

Gary Rumain, the slayer of shitskin moslems, from AUZ, RSA, USA, Sweden,
Hong Kong, Canada, Russia, China, Denmark, UK, .......... wrote:
> Jews are good folks too wrote:
>> Atheism: The Only True "Religion" for the Whole Mankind wrote:
>>
>>> What They Say About Islam
>>>
>>> How Muslims have described Islam
>>
>> Muhammad produced no miracles and when pressed he claimed that his
>> miracle
>> is the Quran. Yet a cursory look at the Quran reveals that this book is
>> full of errors. Quran is replete with scientific heresies, historic
>> blunders, mathematical mistakes, logical absurdities, grammatical errors
>> and ethical fallacies. It is badly compiled and it contradicts itself.
>> There is nothing intelligent in this book let alone miraculous. Muhammad
>> challenged people to produce a "Surah like it " or find an error
>> therein,
>> yet Muslims would kill anyone who dares to criticize it. In such a
>> climate
>> of hypocrisy and violence truth is the first casualty.
>>
>> http://www.apostatesof...
>>
>> The Islamic teachings that I received were accepted totally by me in the
>> beginning. I defended Islam at all costs. I hated anyone who
>> criticized the
>> prophet or Islam. However, when I read "23 Years of Prophet " by Ali
>> Dashti,
>> and when I went through various web-sites like Answering-islam.org,
>> Faithfreedom.org, and the Prophetofdoom.net, and had discussions with
>> non-Muslims, I began to lift my head out of the sand. I started analysing
>> the Quran and the Islamic teachings and I realized that the mullahs
>> and the
>> Islamic scholars were hoodwinking the Muslims.
>> http://islam-watch.org/LeavingIslam/Why-I-Quit...
>>
>> "Understanding what the Quran is trying to convey and what the political
>> Islam is doing, the inconsistencies, the hatred, the self pity, the
>> blaming
>> tactics, the refusal to look internally to see the rotten interior of the
>> whole religious establishment, the constant persecution of
>> the "conscientious " and the "intellectuals " within and the
>> suppression
>> of
>> the common folks by the religious establishment. " "Anonymous
>>
>> "It deprived me of the things that made life worth living: hanging with
>> friends, going to parties, girls during the teenage years. This misery
>> caused me to examine Islam and I found that Islam was violent, intolerant
>> and a plague on mankind. " "Anonymous, Canada
>>
>> "Islam has shown me judgment, fear and guilt. No rights as A woman
>> and a
>> coldness... It did not offer the answers I sought... " "Anonymous, USA
>>
>> "I left Islam because my soul was screaming for release, I intuitively
>> knew
>> it wasn't holy. " "Drak, Australia
>>
>> "Religions were created by humans for positive and negative purposes,
>> Islam
>> has very few of those positive so I don't need it " " love and
>> peace for
>> everything, Algeria
>>
>> http://www.islam-watch.org/LeavingIslam/Why_Left...
>>
>
> I'm amazed at your knowledge of dirty shitskin goat fucking mohammadans.
>
>
> Gary the mighty Yaako warrior.

Mirelle

10/15/2007 11:20:00 PM

0

Gary Rumain from AUZ, RSA, USA, Sweden, Hong Kong, Canada, Russia,
China, Denmark, UK, .........., the slayer of shitskin moslems. wrote:
> Gary Rumain, the slayer of shitskin moslems, from AUZ, RSA, USA, Sweden,
> Hong Kong, Canada, Russia, China, Denmark, UK, .......... wrote:
>> Jews are good folks too wrote:
>>> Atheism: The Only True "Religion" for the Whole Mankind wrote:
>>>
>>>> What They Say About Islam
>>>>
>>>> How Muslims have described Islam
>>>
>>> Muhammad produced no miracles and when pressed he claimed that his
>>> miracle
>>> is the Quran. Yet a cursory look at the Quran reveals that this book is
>>> full of errors. Quran is replete with scientific heresies, historic
>>> blunders, mathematical mistakes, logical absurdities, grammatical errors
>>> and ethical fallacies. It is badly compiled and it contradicts itself.
>>> There is nothing intelligent in this book let alone miraculous. Muhammad
>>> challenged people to produce a "Surah like it " or find an error
>>> therein,
>>> yet Muslims would kill anyone who dares to criticize it. In such a
>>> climate
>>> of hypocrisy and violence truth is the first casualty.
>>>
>>> http://www.apostatesof...
>>>
>>> The Islamic teachings that I received were accepted totally by me in the
>>> beginning. I defended Islam at all costs. I hated anyone who
>>> criticized the
>>> prophet or Islam. However, when I read "23 Years of Prophet " by Ali
>>> Dashti,
>>> and when I went through various web-sites like Answering-islam.org,
>>> Faithfreedom.org, and the Prophetofdoom.net, and had discussions with
>>> non-Muslims, I began to lift my head out of the sand. I started
>>> analysing
>>> the Quran and the Islamic teachings and I realized that the mullahs
>>> and the
>>> Islamic scholars were hoodwinking the Muslims.
>>> http://islam-watch.org/LeavingIslam/Why-I-Quit...
>>>
>>> "Understanding what the Quran is trying to convey and what the
>>> political
>>> Islam is doing, the inconsistencies, the hatred, the self pity, the
>>> blaming
>>> tactics, the refusal to look internally to see the rotten interior of
>>> the
>>> whole religious establishment, the constant persecution of
>>> the "conscientious " and the "intellectuals " within and the
>>> suppression
>>> of
>>> the common folks by the religious establishment. " "Anonymous
>>>
>>> "It deprived me of the things that made life worth living: hanging
>>> with
>>> friends, going to parties, girls during the teenage years. This misery
>>> caused me to examine Islam and I found that Islam was violent,
>>> intolerant
>>> and a plague on mankind. " "Anonymous, Canada
>>>
>>> "Islam has shown me judgment, fear and guilt. No rights as A woman
>>> and a
>>> coldness... It did not offer the answers I sought... " "Anonymous, USA
>>>
>>> "I left Islam because my soul was screaming for release, I intuitively
>>> knew
>>> it wasn't holy. " "Drak, Australia
>>>
>>> "Religions were created by humans for positive and negative purposes,
>>> Islam
>>> has very few of those positive so I don't need it " " love and
>>> peace for
>>> everything, Algeria
>>>
>>> http://www.islam-watch.org/LeavingIslam/Why_Left...
>>>
>>
>> I'm amazed at your knowledge of dirty shitskin goat fucking mohammadans.
>>
>>
>> Gary the mighty Yaako warrior.

Yaako Warrior from AUZ, China, RSA, USA, Sweden, Hong Kong, Canada, Russia, China, Denmark, UK, ....

10/21/2007 11:27:00 PM

0

Gary Rumain from AUZ, RSA, USA, Sweden, Hong Kong, Canada, Russia,
China, Denmark, UK, .........., the slayer of shitskin moslems. wrote:
> Gary Rumain, the slayer of shitskin moslems, from AUZ, RSA, USA, Sweden,
> Hong Kong, Canada, Russia, China, Denmark, UK, .......... wrote:
>> Jews are good folks too wrote:
>>> Atheism: The Only True "Religion" for the Whole Mankind wrote:
>>>
>>>> What They Say About Islam
>>>>
>>>> How Muslims have described Islam
>>>
>>> Muhammad produced no miracles and when pressed he claimed that his
>>> miracle
>>> is the Quran. Yet a cursory look at the Quran reveals that this book is
>>> full of errors. Quran is replete with scientific heresies, historic
>>> blunders, mathematical mistakes, logical absurdities, grammatical errors
>>> and ethical fallacies. It is badly compiled and it contradicts itself.
>>> There is nothing intelligent in this book let alone miraculous. Muhammad
>>> challenged people to produce a "Surah like it " or find an error
>>> therein,
>>> yet Muslims would kill anyone who dares to criticize it. In such a
>>> climate
>>> of hypocrisy and violence truth is the first casualty.
>>>
>>> http://www.apostatesof...
>>>
>>> The Islamic teachings that I received were accepted totally by me in the
>>> beginning. I defended Islam at all costs. I hated anyone who
>>> criticized the
>>> prophet or Islam. However, when I read "23 Years of Prophet " by Ali
>>> Dashti,
>>> and when I went through various web-sites like Answering-islam.org,
>>> Faithfreedom.org, and the Prophetofdoom.net, and had discussions with
>>> non-Muslims, I began to lift my head out of the sand. I started
>>> analysing
>>> the Quran and the Islamic teachings and I realized that the mullahs
>>> and the
>>> Islamic scholars were hoodwinking the Muslims.
>>> http://islam-watch.org/LeavingIslam/Why-I-Quit...
>>>
>>> "Understanding what the Quran is trying to convey and what the
>>> political
>>> Islam is doing, the inconsistencies, the hatred, the self pity, the
>>> blaming
>>> tactics, the refusal to look internally to see the rotten interior of
>>> the
>>> whole religious establishment, the constant persecution of
>>> the "conscientious " and the "intellectuals " within and the
>>> suppression
>>> of
>>> the common folks by the religious establishment. " "Anonymous
>>>
>>> "It deprived me of the things that made life worth living: hanging
>>> with
>>> friends, going to parties, girls during the teenage years. This misery
>>> caused me to examine Islam and I found that Islam was violent,
>>> intolerant
>>> and a plague on mankind. " "Anonymous, Canada
>>>
>>> "Islam has shown me judgment, fear and guilt. No rights as A woman
>>> and a
>>> coldness... It did not offer the answers I sought... " "Anonymous, USA
>>>
>>> "I left Islam because my soul was screaming for release, I intuitively
>>> knew
>>> it wasn't holy. " "Drak, Australia
>>>
>>> "Religions were created by humans for positive and negative purposes,
>>> Islam
>>> has very few of those positive so I don't need it " " love and
>>> peace for
>>> everything, Algeria
>>>
>>> http://www.islam-watch.org/LeavingIslam/Why_Left...
>>>
>>
>> I'm amazed at your knowledge of dirty shitskin goat fucking mohammadans.
>>
>>
>> Gary the mighty Yaako warrior.