Class: GiactVerification::XmlToHash
- Inherits:
-
Object
- Object
- GiactVerification::XmlToHash
- Defined in:
- lib/giact_verification/xml_to_hash.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(args) ⇒ XmlToHash
constructor
A new instance of XmlToHash.
Constructor Details
#initialize(args) ⇒ XmlToHash
10 11 12 13 |
# File 'lib/giact_verification/xml_to_hash.rb', line 10 def initialize(args) @xml = args[:xml] @parser = args[:parser] || Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym}) end |
Class Method Details
.call(args) ⇒ Object
6 7 8 |
# File 'lib/giact_verification/xml_to_hash.rb', line 6 def self.call(args) new(args).call end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'lib/giact_verification/xml_to_hash.rb', line 15 def call parser.parse(xml) end |