Class: Kelbim::DSL::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/kelbim/dsl/converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exported, instance_names) ⇒ Converter

of class methods



12
13
14
15
# File 'lib/kelbim/dsl/converter.rb', line 12

def initialize(exported, instance_names)
  @exported = exported
  @instance_names = instance_names
end

Class Method Details

.convert(exported, instance_names) ⇒ Object



7
8
9
# File 'lib/kelbim/dsl/converter.rb', line 7

def convert(exported, instance_names)
  self.new(exported, instance_names).convert
end

Instance Method Details

#convertObject



17
18
19
20
21
# File 'lib/kelbim/dsl/converter.rb', line 17

def convert
  @exported.each.map {|vpc, load_balancers|
    output_ec2(vpc, load_balancers)
  }.join("\n")
end