Class: AwsMfa::ShellCommand
- Inherits:
-
Object
- Object
- AwsMfa::ShellCommand
- Defined in:
- lib/aws_mfa/shell_command.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(command) ⇒ ShellCommand
constructor
A new instance of ShellCommand.
Constructor Details
#initialize(command) ⇒ ShellCommand
Returns a new instance of ShellCommand.
7 8 9 |
# File 'lib/aws_mfa/shell_command.rb', line 7 def initialize(command) @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/aws_mfa/shell_command.rb', line 5 def command @command end |
Instance Method Details
#call ⇒ Object
11 12 13 14 |
# File 'lib/aws_mfa/shell_command.rb', line 11 def call output = `#{command}` ShellCommandResult.new(output, $?) end |