Class: Opsup::Config
Constant Summary collapse
- MODES =
T.let(i[parallel serial one_then_all].freeze, T::Array[Symbol])
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
readonly
Returns the value of attribute aws_access_key_id.
-
#aws_secret_access_key ⇒ Object
readonly
Returns the value of attribute aws_secret_access_key.
-
#dryrun ⇒ Object
readonly
Returns the value of attribute dryrun.
-
#opsworks_region ⇒ Object
readonly
Returns the value of attribute opsworks_region.
-
#running_mode ⇒ Object
readonly
Returns the value of attribute running_mode.
-
#stack_name ⇒ Object
readonly
Returns the value of attribute stack_name.
Instance Method Summary collapse
-
#initialize(stack_name:, aws_access_key_id:, aws_secret_access_key:, opsworks_region:, running_mode: nil, dryrun: false) ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize(stack_name:, aws_access_key_id:, aws_secret_access_key:, opsworks_region:, running_mode: nil, dryrun: false) ⇒ Config
Returns a new instance of Config.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/opsup/config.rb', line 38 def initialize( stack_name:, aws_access_key_id:, aws_secret_access_key:, opsworks_region:, running_mode: nil, dryrun: false ) @stack_name = T.let(stack_name, String) @aws_access_key_id = T.let(aws_access_key_id, String) @aws_secret_access_key = T.let(aws_secret_access_key, String) @opsworks_region = T.let(opsworks_region, String) @running_mode = T.let(running_mode || MODES.fetch(0), Symbol) @dryrun = T.let(dryrun, T::Boolean) end |
Instance Attribute Details
#aws_access_key_id ⇒ Object (readonly)
Returns the value of attribute aws_access_key_id.
12 13 14 |
# File 'lib/opsup/config.rb', line 12 def aws_access_key_id @aws_access_key_id end |
#aws_secret_access_key ⇒ Object (readonly)
Returns the value of attribute aws_secret_access_key.
15 16 17 |
# File 'lib/opsup/config.rb', line 15 def aws_secret_access_key @aws_secret_access_key end |
#dryrun ⇒ Object (readonly)
Returns the value of attribute dryrun.
24 25 26 |
# File 'lib/opsup/config.rb', line 24 def dryrun @dryrun end |
#opsworks_region ⇒ Object (readonly)
Returns the value of attribute opsworks_region.
18 19 20 |
# File 'lib/opsup/config.rb', line 18 def opsworks_region @opsworks_region end |
#running_mode ⇒ Object (readonly)
Returns the value of attribute running_mode.
21 22 23 |
# File 'lib/opsup/config.rb', line 21 def running_mode @running_mode end |
#stack_name ⇒ Object (readonly)
Returns the value of attribute stack_name.
9 10 11 |
# File 'lib/opsup/config.rb', line 9 def stack_name @stack_name end |
Instance Method Details
#to_h ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/opsup/config.rb', line 55 def to_h { stack_name: stack_name, aws_access_key_id: aws_access_key_id, aws_secret_access_key: aws_secret_access_key, opsworks_region: opsworks_region, running_mode: running_mode, dryrun: dryrun, } end |