Class: CfFactory::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, #hash_to_string, #set_quotes

Constructor Details

#initialize(commands) ⇒ CfCloudFormationCommands

Returns a new instance of CfCloudFormationCommands.



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

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

Instance Method Details

#additional_indentObject



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

def additional_indent
  @additional_indent += 2
end

#get_cf_attributesObject



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

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