Class: Serialisable::Selector::Nodes

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



38
39
40
41
42
# File 'lib/serialisable/selector.rb', line 38

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