Class: AwsAssumeRole::Runner

Inherits:
Dry::Struct
  • Object
show all
Includes:
Logging
Defined in:
lib/aws_assume_role/runner.rb

Instance Method Summary collapse

Methods included from Logging

included

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.


13
14
15
16
17
18
19
20
# File 'lib/aws_assume_role/runner.rb', line 13

def initialize(options)
    super(options)
    command_to_exec = command.join(" ")
    process_credentials unless credentials.blank?
    system environment, command_to_exec
    exit_status = $CHILD_STATUS.exitstatus
    process_error(exit_status) if exit_status != expected_exit_code
end