Class: CFnDK::GlobalConfig
- Inherits:
-
Object
- Object
- CFnDK::GlobalConfig
- Defined in:
- lib/cfndk/global_config.rb
Instance Attribute Summary collapse
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#s3_template_bucket ⇒ Object
readonly
Returns the value of attribute s3_template_bucket.
-
#s3_template_hash ⇒ Object
readonly
Returns the value of attribute s3_template_hash.
-
#timeout_in_minutes ⇒ Object
readonly
Returns the value of attribute timeout_in_minutes.
Instance Method Summary collapse
-
#initialize(data, option) ⇒ GlobalConfig
constructor
A new instance of GlobalConfig.
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
#region ⇒ Object (readonly)
Returns the value of attribute region.
3 4 5 |
# File 'lib/cfndk/global_config.rb', line 3 def region @region end |
#s3_template_bucket ⇒ Object (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_hash ⇒ Object (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_minutes ⇒ Object (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 |