lib/arborist/event/node.rb in arborist-0.0.1.pre20160829140603 vs lib/arborist/event/node.rb in arborist-0.0.1.pre20161005112841
- old
+ new
@@ -22,12 +22,14 @@
attr_reader :node
### Returns +true+ if the specified +object+ matches this event.
def match( object )
- return super &&
- object.respond_to?( :criteria ) && self.node.matches?( object.criteria ) &&
- ( !object.respond_to?(:negative_criteria) || !self.node.matches?(object.negative_criteria) )
+ rval = super &&
+ self.node.matches?( object.criteria ) &&
+ !self.node.matches?( object.negative_criteria, if_empty: false )
+ self.log.debug "Node event #match: %p" % [ rval ]
+ return rval
end
### Use the node data as this event's payload.
def payload