Class: HappyMapper::TextNode

Inherits:
Item
  • Object
show all
Defined in:
lib/happymapper/text_node.rb

Instance Attribute Summary

Attributes inherited from Item

#name, #namespace, #options, #tag, #type

Instance Method Summary collapse

Methods inherited from Item

#constant, #from_xml_node, #initialize, #method_name, #typecast, #xpath

Constructor Details

This class inherits a constructor from HappyMapper::Item

Instance Method Details

#find(node, _namespace, _xpath_options) {|node.children.detect(&:text?)| ... } ⇒ Object

Yields:

  • (node.children.detect(&:text?))


5
6
7
# File 'lib/happymapper/text_node.rb', line 5

def find(node, _namespace, _xpath_options)
  yield(node.children.detect(&:text?))
end