Class: CfFactory::CfEc2Tag
- Inherits:
-
Object
- Object
- CfFactory::CfEc2Tag
show all
- Includes:
- CfInner
- Defined in:
- lib/cf_factory/base/cf_ec2_tag.rb
Instance Method Summary
collapse
Methods included from CfInner
#additional_indent, #generate, #generate_name, #hash_to_string, #set_quotes
Constructor Details
#initialize(key, value, options = {}) ⇒ CfEc2Tag
Returns a new instance of CfEc2Tag.
7
8
9
10
11
|
# File 'lib/cf_factory/base/cf_ec2_tag.rb', line 7
def initialize(key, value, options = {})
@key = key
@value = value
@propagate_at_launch = options[:propagate_at_launch]
end
|
Instance Method Details
#clone ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/cf_factory/base/cf_ec2_tag.rb', line 25
def clone
options = {}
if @propagate_at_launch
options[:propagate_at_launch] = @propagate_at_launch
end
CfEc2Tag.new(@key,@value,options)
end
|
#get_cf_attributes ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/cf_factory/base/cf_ec2_tag.rb', line 17
def get_cf_attributes
result = {"Key" => @key,
"Value" => @value
}
result["PropagateAtLaunch"] = @propagate_at_launch unless @propagate_at_launch.nil?
result
end
|
#set_propagate_at_launch(pal) ⇒ Object
13
14
15
|
# File 'lib/cf_factory/base/cf_ec2_tag.rb', line 13
def set_propagate_at_launch(pal)
@propagate_at_launch = pal
end
|