Class: CfCloudFormationCommands

Inherits:
Object
  • Object
show all
Includes:
CfInner
Defined in:
lib/cf_factory/cloudformation/cf_cloudformation_commands.rb

Instance Method Summary collapse

Methods included from CfInner

#generate, #generate_name, #set_quotes

Constructor Details

#initialize(commands) ⇒ CfCloudFormationCommands

Returns a new instance of CfCloudFormationCommands.



8
9
10
11
# File 'lib/cf_factory/cloudformation/cf_cloudformation_commands.rb', line 8

def initialize(commands)
  @commands = commands
  @additional_indent = 4
end

Instance Method Details

#additional_indentObject



13
14
15
# File 'lib/cf_factory/cloudformation/cf_cloudformation_commands.rb', line 13

def additional_indent
  @additional_indent += 2
end

#get_cf_attributesObject



17
18
19
20
21
22
23
# File 'lib/cf_factory/cloudformation/cf_cloudformation_commands.rb', line 17

def get_cf_attributes
  result = {} 
  @commands.each() {|command|
    result[command.get_name] = command.generate
  }
  result
end