Class: ShellStrike::Ssh::CommandResult

Inherits:
Object
  • Object
show all
Defined in:
lib/shell_strike/ssh/command_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommandResult

Returns a new instance of CommandResult.



4
5
6
7
8
# File 'lib/shell_strike/ssh/command_result.rb', line 4

def initialize(**args)
  args.each do |key, value|
    instance_variable_set("@#{key}".to_sym, value)
  end
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



2
3
4
# File 'lib/shell_strike/ssh/command_result.rb', line 2

def command
  @command
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



2
3
4
# File 'lib/shell_strike/ssh/command_result.rb', line 2

def exit_code
  @exit_code
end

#stderrObject (readonly)

Returns the value of attribute stderr.



2
3
4
# File 'lib/shell_strike/ssh/command_result.rb', line 2

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



2
3
4
# File 'lib/shell_strike/ssh/command_result.rb', line 2

def stdout
  @stdout
end