Class: Google4R::Checkout::XmlGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/google4r/checkout/xml_generation.rb

Instance Method Summary collapse

Constructor Details

#initializeXmlGenerator

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

#generateObject

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