Module: OAS::AdXML::Utils
- Included in:
- OAS::AdXML, Response
- Defined in:
- lib/oas/adxml.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #to_hash ⇒ Object
- #to_s ⇒ Object (also: #to_xml)
Instance Attribute Details
#parser ⇒ Object
10 11 12 |
# File 'lib/oas/adxml.rb', line 10 def parser @parser ||= Nori.new(:advanced_typecasting => false, :convert_tags_to => lambda { |tag| tag.to_sym }) end |
Instance Method Details
#to_hash ⇒ Object
20 21 22 |
# File 'lib/oas/adxml.rb', line 20 def to_hash @hash ||= parser.parse(@doc.to_xml) end |
#to_s ⇒ Object Also known as: to_xml
15 16 17 |
# File 'lib/oas/adxml.rb', line 15 def to_s @doc.to_xml end |