Class: Opsicle::CloneableLayer
- Inherits:
-
Object
- Object
- Opsicle::CloneableLayer
- Defined in:
- lib/opsicle/cloneable_layer.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
Returns the value of attribute cli.
-
#instances ⇒ Object
Returns the value of attribute instances.
-
#layer_id ⇒ Object
Returns the value of attribute layer_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#opsworks ⇒ Object
Returns the value of attribute opsworks.
Instance Method Summary collapse
- #get_cloneable_instances ⇒ Object
-
#initialize(name, layer_id, opsworks, cli) ⇒ CloneableLayer
constructor
A new instance of CloneableLayer.
Constructor Details
#initialize(name, layer_id, opsworks, cli) ⇒ CloneableLayer
Returns a new instance of CloneableLayer.
5 6 7 8 9 10 11 |
# File 'lib/opsicle/cloneable_layer.rb', line 5 def initialize(name, layer_id, opsworks, cli) self.name = name self.layer_id = layer_id self.opsworks = opsworks self.cli = cli self.instances = [] end |
Instance Attribute Details
#cli ⇒ Object
Returns the value of attribute cli.
3 4 5 |
# File 'lib/opsicle/cloneable_layer.rb', line 3 def cli @cli end |
#instances ⇒ Object
Returns the value of attribute instances.
3 4 5 |
# File 'lib/opsicle/cloneable_layer.rb', line 3 def instances @instances end |
#layer_id ⇒ Object
Returns the value of attribute layer_id.
3 4 5 |
# File 'lib/opsicle/cloneable_layer.rb', line 3 def layer_id @layer_id end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/opsicle/cloneable_layer.rb', line 3 def name @name end |
#opsworks ⇒ Object
Returns the value of attribute opsworks.
3 4 5 |
# File 'lib/opsicle/cloneable_layer.rb', line 3 def opsworks @opsworks end |
Instance Method Details
#get_cloneable_instances ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/opsicle/cloneable_layer.rb', line 13 def get_cloneable_instances ops_instances = @opsworks.describe_instances({ :layer_id => layer_id }).instances ops_instances.each do |instance| self.instances << CloneableInstance.new(instance, self, @opsworks, @cli) end self.instances end |