Farrel Lifson
11/6/2006 6:53:00 AM
On 06/11/06, Googled <wanted@gmail.com> wrote:
> Hi,
>
> is there any Ruby equivalent to:
>
> php:
>
> $var = <<<END
> <multi>
> <line>sometext</line>
> <line>sometext</line>
> <line>sometext</line>
> </multi>
> END;
>
> so I can write multiline in a single variable ?
>
> Regards.
Almost the same syntax:
irb(main):001:0> var =<<END
irb(main):002:0" <line>sometext</line>
irb(main):003:0" <line>sometext</line>
irb(main):004:0" <line>sometext</line>
irb(main):005:0" END
=> " <line>sometext</line>\n <line>sometext</line>\n <line>sometext</line>\n"
Farrel