Class: FacturaePrint::Invoice
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- FacturaePrint::Invoice
- Defined in:
- lib/facturae_print/invoice.rb
Instance Method Summary collapse
-
#initialize(xml_file) ⇒ Invoice
constructor
A new instance of Invoice.
Constructor Details
#initialize(xml_file) ⇒ Invoice
Returns a new instance of Invoice.
8 9 10 11 12 13 14 15 |
# File 'lib/facturae_print/invoice.rb', line 8 def initialize(xml_file) super(nil) xml = Nokogiri::XML(xml_file) FacturaePrint::XMLObjectifier.build(xml.root, :object => self, :collection_nodes => ["Invoices", "TaxesOutputs", "Items"]) end |