Class: Opsicle::CloneableStack

Inherits:
Object
  • Object
show all
Defined in:
lib/opsicle/cloneable_stack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/opsicle/cloneable_stack.rb', line 3

def id
  @id
end

#opsworksObject

Returns the value of attribute opsworks.



3
4
5
# File 'lib/opsicle/cloneable_stack.rb', line 3

def opsworks
  @opsworks
end

#stackObject

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_stackObject



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