From: "trans. (T. Onoma)" Date: 2004-10-27T01:45:12+09:00 Subject: Re: Inline YAML in Ruby code - possible? converse? On Tuesday 26 October 2004 12:34 pm, gabriele renzi wrote: | Its Me ha scritto: | > I recall an old post by Why which described some way to inline chunks of | > YAML right into Ruby code. Could not locate it in Google. Roughly like | > | > def foo | > a = %y | > r: abc | > s: pqr | > t: - 1 | > - 2 | > - 3 | > %y | > return a | > end | > | > Does anyone have the details, and what to include to enable this | > processing? | | you have to patch ruby and recompile You can use Peter Vanbroekhoven's patch for user defined %-methods. Find it here: http://developer.berlios.de/projects/suby/ %y for YAML is the first example of it's use: a = %y{ r: abc s: pqr t: - 1 - 2 - 3 } T.