Class: Facturae::FacturaeBuilder
- Inherits:
-
Object
- Object
- Facturae::FacturaeBuilder
- Defined in:
- lib/facturae/builders/facturae_builder.rb
Overview
Builds the XML representation of the Facturae document.
Constant Summary collapse
- FACTURAE_NAMESPACE =
"http://www.facturae.gob.es/formato/Versiones/Facturaev3_2_2.xml"- XMLDSIG_NAMESPACE =
"http://www.w3.org/2000/09/xmldsig#"
Instance Method Summary collapse
-
#initialize(facturae) ⇒ FacturaeBuilder
constructor
A new instance of FacturaeBuilder.
-
#to_xml ⇒ Object
Constructor Details
#initialize(facturae) ⇒ FacturaeBuilder
Returns a new instance of FacturaeBuilder.
10 11 12 |
# File 'lib/facturae/builders/facturae_builder.rb', line 10 def initialize(facturae) @facturae = facturae end |
Instance Method Details
#to_xml ⇒ Object
17 18 19 20 21 |
# File 'lib/facturae/builders/facturae_builder.rb', line 17 def to_xml doc = Nokogiri::XML(build_xml_string) apply_namespaces(doc) doc.to_xml end |