Jake Dempsey
unread,Oct 23, 2009, 2:24:20 PM10/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruleby
rule :Rule_Name,
[Class, :c1, m.method_that_returns_array(&c{|x| x.include?
("VALUE")})],
[Class2, :c2, m.type == "TYPE", m.relationship == b(:c1)] do |v|
puts "found it"
end
rule :Rule_Name2,
[Class2, :c2, m.type == "TYPE", m.relationship(&c{|x|
x.method_that_returns_array.include?("SHUTTLE")})] do |v|
puts "found it"
end
Is the first better because it doesnt have to execute the block on all
Class2 objects in the working memory? In the first approach I have to
assert each Class2 object and also assert its associated Class1
object. Doing this allows me to first scope by Class1. My assumption
is that if i have fewer Class1 objects it would be better to use the
first approach. Also, is my approach for arrays correct here?