Class: NfseSjc::Parser
- Inherits:
-
Object
- Object
- NfseSjc::Parser
- Defined in:
- lib/nfse_sjc/parser.rb
Instance Method Summary collapse
-
#initialize ⇒ Parser
constructor
A new instance of Parser.
- #parse(response) ⇒ Object
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
3 4 5 6 7 8 9 |
# File 'lib/nfse_sjc/parser.rb', line 3 def initialize @nori = Nori.new({ delete_namespace_attributes: true, strip_namespaces: true, convert_dashes_to_underscores: true }) end |
Instance Method Details
#parse(response) ⇒ Object
11 12 13 |
# File 'lib/nfse_sjc/parser.rb', line 11 def parse(response) ResponseHash.new(@nori.parse(response)).to_deep_symbolized_h end |