lib/arborist/event/node.rb in arborist-0.2.0.pre20170519125456 vs lib/arborist/event/node.rb in arborist-0.2.0

- old
+ new

@@ -36,12 +36,16 @@ def payload return self.node.to_h end - ### Inject the node identifier into the generated hash. + ### Inject useful node metadata into the generated hash. def to_h - return super.merge( identifier: self.node.identifier ) + return super.merge( + identifier: self.node.identifier, + parent: self.node.parent, + nodetype: self.node.type + ) end end # module Arborist::Event::NodeMatching