Since you asked:

Ruote.process_definition :name => 'my def 2', :revision => 0 do
  sequence do
 
    set :field=>'red', :value=>3
    set :field=>'green', :value=>4
    set :field=>'blue', :value=>band(4)
    
    # crashes set :field=>'blue' do
    #  band :number=> 4
    #end
    
    composite_visible :r=>'${f:red}', :g=>'${f:green}', :b=>'${f:blue}'
  end
end

create a file in public to hold that definition and load it in ruote_fluo
first two sets do not show up
third set shows up as "band 4"
fourth commented set crashes

Thanks,
Pat.

[Note: wouldn't it be nice to be able to define the variables and then use them 
directly?
like:

red = band :number=>5
green = band :number=>4
blue = band :number=>3

composite_visible :r=>red :g=>green, :b=>blue


On May 17, 2010, at 7:13 PM, John Mettraux wrote:

> 
> On Mon, May 17, 2010 at 11:00:45AM -0400, Cappelaere Patrice wrote:
>> 
>> Yes, I am talking about that ruby_dsl.rb.
>> Its purpose is basically to return a parse tree for your DSL, right?  so why 
>> not use ParseTree?
> 
> Hello,
> 
> because my ruby_dsl takes as input ruby blocks and not strings of ruby code.
> 
> At one extreme, consider :
> 
> ---8<---
> pdef = Ruote.process_definition do
>  sequence do
>    alpha
>    bravo
>  end
> end
> 
> engine.launch(pdef)
> --->8---
> 
> Should I turn the block back into a String before passing it to ParseTree ?
> 
> 
>> [There is a bunch of issues with set expressions... that I was not sure to 
>> bring up before I got an exchange going]
> 
> Bring it on.
> 
> 
> Best regards,
> 
> -- 
> John Mettraux - http://jmettraux.wordpress.com
> 
> -- 
> you received this message because you are subscribed to the "ruote users" 
> group.
> to post : send email to [email protected]
> to unsubscribe : send email to [email protected]
> more options : http://groups.google.com/group/openwferu-users?hl=en

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to