Whoops. This:
===
where the Change class is defined something like this:
class Change
def initialize(a_class, message) #(User, :count)
@receiver = a_class
@msg = message
end
def matches?(callable) #(a_function)
before = @receiver.send(msg) #same as calling User.count()
callable.call #execute a_function()
after = @receiver.send(msg) #same as calling User.count()
before == after
end
...
...
end
===
should look more like this:
where the Change class is defined something like this:
class Change
def initialize(a_class, message) #(User, :count)
@receiver = a_class
@msg = message
end
def matches?(callable) #(a_function)
before = @receiver.send(@msg) #same as calling User.count()
callable.call #execute a_function()
after = @receiver.send(@msg) #same as calling User.count()
before == after
end
...
...
end
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.