Class: YleTfPlugins::AWSAssumeRole::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/yle_tf-aws_assume_role/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_configObject (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_configObject (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

Returns:

  • (Boolean)


11
12
13
# File 'lib/yle_tf-aws_assume_role/config.rb', line 11

def assume_role?
  self[:assume_role]
end