Forum: Ruby YAML question - substitution

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
anthony.elizondo (Guest)
on 2005-12-09 00:44
(Received via mailing list)
I am trying to create the following:

{ 'a' => 'happy', 'b' => 'happy birthday', 'c' => 'happy new year'}

Can YAML do this? I have something like:

a: &first happy
b: *first<<birthday
c: *first.concat('new year')

neither of which work.

Any ideas?
drbrain (Guest)
on 2005-12-09 03:52
(Received via mailing list)
On Dec 8, 2005, at 2:44 PM, Anthony Elizondo wrote:

> neither of which work.
>
> Any ideas?

YAML is just a serialization format:

http://yaml.org/refcard.html

--
Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
This topic is locked and can not be replied to.