Class: VTD::Xml::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/vtd/xml/generator.rb

Constant Summary collapse

GENERATORS =
[:products, :books]

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Generator

Returns a new instance of Generator.



7
8
9
# File 'lib/vtd/xml/generator.rb', line 7

def initialize(root)
  @root = root
end

Instance Method Details

#generateObject



11
12
13
14
15
# File 'lib/vtd/xml/generator.rb', line 11

def generate
  GENERATORS.each do |generator_name|
    open(generator_name, &method(generator_name))
  end
end