passing m to condition block = DSL depreciated. alternative?

1 view
Skip to first unread message

jason

unread,
Oct 4, 2009, 9:33:25 AM10/4/09
to Ruleby
dear groupies,

situation
=======
rule :some_rule
[ExistingAction, :action, m(&c{|action|
action.existing_action.page.depth > action.new_action.page.depth &&
action.existing_action.page.done == false})] do |v|
puts "rule matched"
end

complication
==========
DSL depreciated is thrown by the engine. it seems that passing m to
the block is not supported.
therefore only m.method can be passed to the block.
However i need to compare the values resulting from 2 different
methods in the block. I suspect that this would be done by binding
variables. However binding variables makes the code less readable.

question:
=======
what would be the correct conditional statement and most readable for
the case.?

thanks a million for any feedback.

jason.

Reply all
Reply to author
Forward
0 new messages