Class: LabelFactory::Util::LengthNode
- Inherits:
-
XML::Mapping::SingleAttributeNode
- Object
- XML::Mapping::SingleAttributeNode
- LabelFactory::Util::LengthNode
- Defined in:
- lib/label_factory/util/length_node.rb
Instance Method Summary collapse
- #extract_attr_value(xml) ⇒ Object
- #initialize_impl(path) ⇒ Object
- #set_attr_value(xml, value) ⇒ Object
Instance Method Details
#extract_attr_value(xml) ⇒ Object
9 10 11 12 |
# File 'lib/label_factory/util/length_node.rb', line 9 def extract_attr_value(xml) @value = default_when_xpath_err{@path.first(xml).text} Layout::Length.new(@value) end |
#initialize_impl(path) ⇒ Object
5 6 7 |
# File 'lib/label_factory/util/length_node.rb', line 5 def initialize_impl(path) @path = XML::XXPath.new(path) end |