Class: Google4R::Checkout::CheckoutCommandXmlGenerator
- Inherits:
-
CommandXmlGenerator
- Object
- XmlGenerator
- CommandXmlGenerator
- Google4R::Checkout::CheckoutCommandXmlGenerator
- Defined in:
- lib/google4r/checkout/xml_generation.rb
Overview
Use the CheckoutXmlGenerator to create an XML document from a CheckoutCommand object.
Usage:
checkout = CheckoutCommand.new
# set up the CheckoutCommand
generator = CheckoutCommandXmlGenerator.new(checkout)
puts generator.generate # => "<xml? version=..."
File.new('some.xml', 'w') { |f| f.write generator.generate }
– TODO: Refactor the big, monolitic generator into smaller, easier testable ones. One for each major part of the resulting XML document. This will also reduce the overhead in generating other types of XML documents. ++
Direct Known Subclasses
Constant Summary
Constant Summary
Constants inherited from CommandXmlGenerator
Google4R::Checkout::CommandXmlGenerator::COMMAND_TO_TAG
Instance Method Summary (collapse)
-
- (CheckoutCommandXmlGenerator) initialize(command)
constructor
A new instance of CheckoutCommandXmlGenerator.
Methods inherited from CommandXmlGenerator
#generate, #tag_name_for_command
Methods inherited from XmlGenerator
Constructor Details
- (CheckoutCommandXmlGenerator) initialize(command)
A new instance of CheckoutCommandXmlGenerator
133 134 135 |
# File 'lib/google4r/checkout/xml_generation.rb', line 133 def initialize(command) @command = command end |