Class: ImportEverything::XmlParser::LineParser
- Inherits:
-
LineParser
- Object
- LineParser
- ImportEverything::XmlParser::LineParser
- Includes:
- FromHash
- Defined in:
- lib/import_everything/parsers/xml_parser.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#table ⇒ Object
Returns the value of attribute table.
Instance Method Summary collapse
Methods inherited from LineParser
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
30 31 32 |
# File 'lib/import_everything/parsers/xml_parser.rb', line 30 def doc @doc end |
#table ⇒ Object
Returns the value of attribute table.
30 31 32 |
# File 'lib/import_everything/parsers/xml_parser.rb', line 30 def table @table end |
Instance Method Details
#value_hash ⇒ Object
32 33 34 35 |
# File 'lib/import_everything/parsers/xml_parser.rb', line 32 def value_hash cs = doc.children.reject { |x| x.to_s.blank? } cs.inject({}) { |h,el| h.merge(el.name => el.inner_text) } end |