Class: Xapper::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/xapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mappingsObject

Returns the value of attribute mappings.



20
21
22
# File 'lib/xapper.rb', line 20

def mappings
  @mappings
end

#namespacesObject

Returns the value of attribute namespaces.



21
22
23
# File 'lib/xapper.rb', line 21

def namespaces
  @namespaces
end

Instance Method Details

#map(xml_str) ⇒ Object



23
24
25
26
# File 'lib/xapper.rb', line 23

def map(xml_str)
  xml  = Nokogiri::XML(xml_str)
  map_xml_data(xml, @mappings, {})
end