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{|c| c.text?}| ... } ⇒ Object

Yields:

  • (node.children.detect{|c| c.text?})


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

def find(node, namespace, xpath_options)
  yield(node.children.detect{|c| c.text?})
end