Class: Nfe
- Inherits:
-
Object
- Object
- Nfe
- Defined in:
- lib/sefazp/nfe.rb
Instance Method Summary collapse
-
#initialize(xml_content) ⇒ Nfe
constructor
A new instance of Nfe.
- #parse ⇒ Object
Constructor Details
#initialize(xml_content) ⇒ Nfe
Returns a new instance of Nfe.
2 3 4 |
# File 'lib/sefazp/nfe.rb', line 2 def initialize(xml_content) @document = REXML::Document.new(xml_content) end |
Instance Method Details
#parse ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/sefazp/nfe.rb', line 6 def parse case @document.elements["nfeProc"].attributes["versao"] when "2.00" parse_v200 when "3.10" parse_v310 else return nil end end |