Have you heard about Markaby and Haml? One of these might be what you
need (unless you just want to write something new for fun).

2012/1/15, Yossef Mendelssohn <ymendel / pobox.com>:
> On Jan 14, 9:09pm, Marc Heiler <sheve... / linuxmail.org> wrote:
>> So I then thought "Let's try this:"
>>
>>  area.shape 'rext' .coords '1,1,100,50' .href 'http://www.foobar.com'
>>
>> Ok, this does not work in Ruby. Even adding () won't work, the method
>> chaining happens on String object eventually (and I would have cheated,
>> area would be def area, so area() instead, returning a specific class
>> that would respond to methods like shape, coords, href.
>
> There's no reason that with appropriate parens wouldn't work. By
> appropriate parens I mean
>
>   area.shape('rect').coords('1,1,100,50').href('http://
> www.foobar.com')
>
> Look into Fluent Interfaces for more info on that sort of thing.
>
> This easily gets into contentious areas like metaprogramming, blank
> objects, DSLs, and creating new languages (or dialects). Consider how
> much you really want this. Look into already existing projects that
> are already in this arena, like, say, HAML.
>
>> I am not really sure if I am able to express what I am trying to
>> achieve. :)
>
> Well, that's something to work on. Good luck.
>
> --
> -yossef
>
>


-- 
-- Matma Rex