Class: CuffSert::StackConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/cuffsert/metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStackConfig



9
10
11
12
13
14
15
# File 'lib/cuffsert/metadata.rb', line 9

def initialize
  @aws_region = ENV['AWS_REGION'] || ENV['AWS_DEFAULT_REGION'] || 'us-east-1'
  @selected_path = []
  @op_mode = :normal
  @parameters = {}
  @tags = {}
end

Instance Attribute Details

#aws_regionObject

Returns the value of attribute aws_region.



6
7
8
# File 'lib/cuffsert/metadata.rb', line 6

def aws_region
  @aws_region
end

#op_modeObject

Returns the value of attribute op_mode.



6
7
8
# File 'lib/cuffsert/metadata.rb', line 6

def op_mode
  @op_mode
end

#parametersObject

Returns the value of attribute parameters.



7
8
9
# File 'lib/cuffsert/metadata.rb', line 7

def parameters
  @parameters
end

#selected_pathObject

Returns the value of attribute selected_path.



6
7
8
# File 'lib/cuffsert/metadata.rb', line 6

def selected_path
  @selected_path
end

#stack_uriObject

Returns the value of attribute stack_uri.



6
7
8
# File 'lib/cuffsert/metadata.rb', line 6

def stack_uri
  @stack_uri
end

#stacknameObject

Returns the value of attribute stackname.



6
7
8
# File 'lib/cuffsert/metadata.rb', line 6

def stackname
  @stackname
end

#suffixObject

Returns the value of attribute suffix.



7
8
9
# File 'lib/cuffsert/metadata.rb', line 7

def suffix
  @suffix
end

#tagsObject

Returns the value of attribute tags.



7
8
9
# File 'lib/cuffsert/metadata.rb', line 7

def tags
  @tags
end

Instance Method Details

#append_path(lmnt) ⇒ Object



17
18
19
# File 'lib/cuffsert/metadata.rb', line 17

def append_path(lmnt)
  @selected_path << lmnt
end

#update_from(metadata) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/cuffsert/metadata.rb', line 21

def update_from()
  @stackname = [:stackname] || @stackname
  @suffix = [:suffix] || @suffix
  @parameters.merge!([:parameters] || {})
  @tags.merge!([:tags] || {})
  self
end