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.
5 6 7 |
# File 'lib/aws_mfa/shell_command.rb', line 5 def initialize(command) @command = command end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/aws_mfa/shell_command.rb', line 3 def command @command end |
Instance Method Details
#call ⇒ Object
9 10 11 12 |
# File 'lib/aws_mfa/shell_command.rb', line 9 def call output = `#{command}` ShellCommandResult.new(output, $?) end |