Trouble with &condition

0 views
Skip to first unread message

Jake Dempsey

unread,
Oct 23, 2009, 1:47:31 PM10/23/09
to Ruleby
I have started looking at ruleby but have hit a small snag. I can't
seem to understand how to use &condition. I have something like:

rule :Rule2,
[MyCass, :m, m.some_method_that_returns_an_array(&c{ |r|
r.include?("some val")})] do |v|
puts 'found it'
end

Am I defining this wrong? My understanding is that I can use
condition or c to apply a block to a method and the block will return
true or false for a match. Is this wrong?


Also, I think I found a bug. The method "binding" does not delegate
to method "b" correctly.

Jake Dempsey

unread,
Oct 23, 2009, 2:13:23 PM10/23/09
to Ruleby
Ignore me...i figured it out..was my fault.

But i still think the bug in my post is valid.

Joe Kutner

unread,
Oct 23, 2009, 3:51:00 PM10/23/09
to rul...@googlegroups.com
Ah, thank you for pointing this out. I have put a fix into trunk:

http://github.com/mattup/ruleby/commit/e7100b1c304f6b96960f4c53e2fd951317b49a24
Reply all
Reply to author
Forward
0 new messages