Class: CfFactory::CfCloudFormationFile
- Inherits:
-
Object
- Object
- CfFactory::CfCloudFormationFile
show all
- Includes:
- CfInner
- Defined in:
- lib/cf_factory/cloudformation/cf_cloudformation_file.rb
Instance Method Summary
collapse
Methods included from CfInner
#generate, #generate_name, #hash_to_string, #set_quotes
Constructor Details
#initialize(name, content, group, owner, mode, options = {}) ⇒ CfCloudFormationFile
Returns a new instance of CfCloudFormationFile.
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/cf_factory/cloudformation/cf_cloudformation_file.rb', line 13
def initialize(name, content, group, owner, mode, options = {})
@name = name
@content = content
@group = group
@owner = owner
@mode = mode
@source = options[:source]
@additional_indent = 6
end
|
Instance Method Details
#additional_indent ⇒ Object
25
26
27
|
# File 'lib/cf_factory/cloudformation/cf_cloudformation_file.rb', line 25
def additional_indent
@additional_indent += 2
end
|
#get_cf_attributes ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/cf_factory/cloudformation/cf_cloudformation_file.rb', line 29
def get_cf_attributes
result = {}
result["content"] = @content
result["group"] = @group
result["owner"] = @owner
result["mode"] = @mode
result["source"] = @source unless @source.nil?
result
end
|
#get_name ⇒ Object
9
10
11
|
# File 'lib/cf_factory/cloudformation/cf_cloudformation_file.rb', line 9
def get_name
@name
end
|