Class: NfseSjc::Parser

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

Instance Method Summary collapse

Constructor Details

#initializeParser

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