Bound variables as method arguments

19 views
Skip to first unread message

Dex

unread,
Sep 9, 2011, 12:11:45 PM9/9/11
to Ruleby
Greetings,

I'm trying without success to use bound variables as method arguments
called within the Ruleby's 'f' method like this:

rule [ Foo, :foo, { m.value => :y } ], [ Bar, :bar, { m.value
=> :z } ], [ Calculator, :calc, f([ b(:m), b(:y) ], c { |x, y, z|
x.calculate(y, z) > 0 }) ] do |r|
...
end

Is this not possible at all? Am I missing something here? Is there
another approach to use externally provided data as method arguments
at the left hand side of the rule?

Thanks for your time.
MG

Joe Kutner

unread,
Sep 15, 2011, 12:48:28 PM9/15/11
to rul...@googlegroups.com
Sorry for the delay responding to this.

At this time the function conditions don't support bound variables. So what you are trying is not possible. There's no reason they can't support bindings - it just hasn't been implemented yet. I'll move it up on the list of things to do :)

Thanks,

Joe

> --
> You received this message because you are subscribed to the Google Groups "Ruleby" group.
> To post to this group, send email to rul...@googlegroups.com.
> To unsubscribe from this group, send email to ruleby+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ruleby?hl=en.
>

Dex

unread,
Sep 15, 2011, 12:51:26 PM9/15/11
to Ruleby
Thanks for the info.

Cheers
MG
Reply all
Reply to author
Forward
0 new messages