Class: Serialisable::Selector::Node

Inherits:
Serialisable::Selector show all
Defined in:
lib/serialisable/selector.rb

Instance Attribute Summary

Attributes inherited from Serialisable::Selector

#name

Instance Method Summary collapse

Methods inherited from Serialisable::Selector

#initialize, #parse

Constructor Details

This class inherits a constructor from Serialisable::Selector

Instance Method Details

#match(root) ⇒ Object



30
31
32
33
34
# File 'lib/serialisable/selector.rb', line 30

def match(root)
  parse root.children
    .find {|node| node.name == @selector }
    .children.to_s
end