Class: CfCloudFormationConfig

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

Instance Method Summary collapse

Methods included from CfInner

#generate, #generate_name, #set_quotes

Constructor Details

#initialize(name, sources, commands, files, packages) ⇒ CfCloudFormationConfig

Returns a new instance of CfCloudFormationConfig.



12
13
14
15
16
17
18
# File 'lib/cf_factory/cloudformation/cf_cloudformation_config.rb', line 12

def initialize(name, sources, commands, files, packages)
  @name = name
  @sources = sources
  @commands = commands
  @files = files
  @packages = packages
end

Instance Method Details

#additional_indentObject



20
21
22
# File 'lib/cf_factory/cloudformation/cf_cloudformation_config.rb', line 20

def additional_indent
  4
end

#get_cf_attributesObject



24
25
26
27
28
29
30
31
# File 'lib/cf_factory/cloudformation/cf_cloudformation_config.rb', line 24

def get_cf_attributes
  result = {}
  result["sources"] = CfHelper.clean(@sources.generate) unless @sources.nil?
  result["commands"] = @commands.generate unless @commands.nil?
  result["files"] = @files.generate unless @files.nil?
  result["packages"] = @packages.generate unless @packages.nil?
  result
end

#get_nameObject



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

def get_name
  @name
end