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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.?