Class: Google4R::Checkout::XmlGenerator
- Inherits:
-
Object
- Object
- Google4R::Checkout::XmlGenerator
- Defined in:
- lib/google4r/checkout/xml_generation.rb
Direct Known Subclasses
CommandXmlGenerator, MerchantCalculationResultsXmlGenerator, NotificationAcknowledgementXmlGenerator
Instance Method Summary collapse
-
#generate ⇒ Object
Base method to generate the XML for a particular command.
-
#initialize ⇒ XmlGenerator
constructor
A new instance of XmlGenerator.
Constructor Details
#initialize ⇒ XmlGenerator
Returns a new instance of XmlGenerator.
39 40 41 |
# File 'lib/google4r/checkout/xml_generation.rb', line 39 def initialize() raise 'Cannot instantiate an abstract class.' end |
Instance Method Details
#generate ⇒ Object
Base method to generate the XML for a particular command
44 45 46 47 48 49 50 |
# File 'lib/google4r/checkout/xml_generation.rb', line 44 def generate @document = REXML::Document.new declaration = REXML::XMLDecl.new declaration.encoding = 'utf-8' @document << declaration end |