Class: CFnDK::GlobalConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/cfndk/global_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, option) ⇒ GlobalConfig

Returns a new instance of GlobalConfig.



4
5
6
7
8
9
10
11
12
13
# File 'lib/cfndk/global_config.rb', line 4

def initialize(data, option)
  @timeout_in_minutes = 1
  @s3_template_bucket = 'cfndk-templates'
  @s3_template_hash = SecureRandom.uuid
  @region = ENV['AWS_REGION'] || 'us-east-1'
  return unless data['global'].is_a?(Hash)
  @timeout_in_minutes = data['global']['timeout_in_minutes'] || 1
  @s3_template_bucket = data['global']['s3_template_bucket'] || 'cfndk-templates'
  @region = data['global']['region'] || ENV['AWS_REGION'] || 'us-east-1'
end

Instance Attribute Details

#regionObject (readonly)

Returns the value of attribute region.



3
4
5
# File 'lib/cfndk/global_config.rb', line 3

def region
  @region
end

#s3_template_bucketObject (readonly)

Returns the value of attribute s3_template_bucket.



3
4
5
# File 'lib/cfndk/global_config.rb', line 3

def s3_template_bucket
  @s3_template_bucket
end

#s3_template_hashObject (readonly)

Returns the value of attribute s3_template_hash.



3
4
5
# File 'lib/cfndk/global_config.rb', line 3

def s3_template_hash
  @s3_template_hash
end

#timeout_in_minutesObject (readonly)

Returns the value of attribute timeout_in_minutes.



3
4
5
# File 'lib/cfndk/global_config.rb', line 3

def timeout_in_minutes
  @timeout_in_minutes
end