Class: Opsicle::CloneableStack
- Inherits:
-
Object
- Object
- Opsicle::CloneableStack
- Defined in:
- lib/opsicle/cloneable_stack.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#opsworks ⇒ Object
Returns the value of attribute opsworks.
-
#stack ⇒ Object
Returns the value of attribute stack.
Instance Method Summary collapse
- #get_stack ⇒ Object
-
#initialize(stack_id, opsworks) ⇒ CloneableStack
constructor
A new instance of CloneableStack.
Constructor Details
#initialize(stack_id, opsworks) ⇒ CloneableStack
Returns a new instance of CloneableStack.
5 6 7 8 9 |
# File 'lib/opsicle/cloneable_stack.rb', line 5 def initialize(stack_id, opsworks) self.id = stack_id self.opsworks = opsworks self.stack = get_stack end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/opsicle/cloneable_stack.rb', line 3 def id @id end |
#opsworks ⇒ Object
Returns the value of attribute opsworks.
3 4 5 |
# File 'lib/opsicle/cloneable_stack.rb', line 3 def opsworks @opsworks end |
#stack ⇒ Object
Returns the value of attribute stack.
3 4 5 |
# File 'lib/opsicle/cloneable_stack.rb', line 3 def stack @stack end |
Instance Method Details
#get_stack ⇒ Object
11 12 13 |
# File 'lib/opsicle/cloneable_stack.rb', line 11 def get_stack @opsworks.describe_stacks({ :stack_ids => [self.id.to_s] }).stacks.first end |