Class: YleTfPlugins::AWSAssumeRole::Config
- Inherits:
-
Object
- Object
- YleTfPlugins::AWSAssumeRole::Config
- Defined in:
- lib/yle_tf-aws_assume_role/config.rb
Instance Attribute Summary collapse
-
#action_config ⇒ Object
readonly
Returns the value of attribute action_config.
-
#tf_config ⇒ Object
readonly
Returns the value of attribute tf_config.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #assume_role? ⇒ Boolean
-
#initialize(action_config, tf_config) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(action_config, tf_config) ⇒ Config
Returns a new instance of Config.
6 7 8 9 |
# File 'lib/yle_tf-aws_assume_role/config.rb', line 6 def initialize(action_config, tf_config) @action_config = action_config @tf_config = tf_config end |
Instance Attribute Details
#action_config ⇒ Object (readonly)
Returns the value of attribute action_config.
4 5 6 |
# File 'lib/yle_tf-aws_assume_role/config.rb', line 4 def action_config @action_config end |
#tf_config ⇒ Object (readonly)
Returns the value of attribute tf_config.
4 5 6 |
# File 'lib/yle_tf-aws_assume_role/config.rb', line 4 def tf_config @tf_config end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/yle_tf-aws_assume_role/config.rb', line 15 def [](key) @action_config.fetch(key.to_sym) { tf_config.fetch('aws', key.to_s) } end |
#assume_role? ⇒ Boolean
11 12 13 |
# File 'lib/yle_tf-aws_assume_role/config.rb', line 11 def assume_role? self[:assume_role] end |