Class: Dynamocli::AWS::Stack

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/dynamocli/aws/stack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name:, table_resource:, cloudformation: nil, logger: nil) ⇒ Stack

Returns a new instance of Stack.



17
18
19
20
21
22
23
24
# File 'lib/dynamocli/aws/stack.rb', line 17

def initialize(table_name:, table_resource:, cloudformation: nil, logger: nil)
  @table_name = table_name
  @table_resource = table_resource
  @cloudformation = cloudformation || CLOUDFORMARTION.new
  @logger = logger || LOGGER.new

  set_attributes_now_because_they_will_change
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def name
  @name
end

#original_templateObject (readonly)

Returns the value of attribute original_template.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def original_template
  @original_template
end

#policy_bodyObject (readonly)

Returns the value of attribute policy_body.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def policy_body
  @policy_body
end

#resourcesObject (readonly)

Returns the value of attribute resources.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def resources
  @resources
end

#template_bodyObject (readonly)

Returns the value of attribute template_body.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def template_body
  @template_body
end

#template_without_tableObject (readonly)

Returns the value of attribute template_without_table.



11
12
13
# File 'lib/dynamocli/aws/stack.rb', line 11

def template_without_table
  @template_without_table
end

Instance Method Details

#deploying?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/dynamocli/aws/stack.rb', line 26

def deploying?
  current_status != DEPLOY_COMPLETED_KEY
end