Class: CommandResult
- Inherits:
-
Object
- Object
- CommandResult
- Defined in:
- lib/linux_admin/command_result.rb
Instance Attribute Summary collapse
-
#command_line ⇒ Object
readonly
Returns the value of attribute command_line.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#exit_status ⇒ Object
readonly
Returns the value of attribute exit_status.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
-
#initialize(command_line, output, error, exit_status) ⇒ CommandResult
constructor
A new instance of CommandResult.
- #inspect ⇒ Object
Constructor Details
#initialize(command_line, output, error, exit_status) ⇒ CommandResult
Returns a new instance of CommandResult.
4 5 6 7 8 9 |
# File 'lib/linux_admin/command_result.rb', line 4 def initialize(command_line, output, error, exit_status) @command_line = command_line @output = output @error = error @exit_status = exit_status end |
Instance Attribute Details
#command_line ⇒ Object (readonly)
Returns the value of attribute command_line.
2 3 4 |
# File 'lib/linux_admin/command_result.rb', line 2 def command_line @command_line end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
2 3 4 |
# File 'lib/linux_admin/command_result.rb', line 2 def error @error end |
#exit_status ⇒ Object (readonly)
Returns the value of attribute exit_status.
2 3 4 |
# File 'lib/linux_admin/command_result.rb', line 2 def exit_status @exit_status end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
2 3 4 |
# File 'lib/linux_admin/command_result.rb', line 2 def output @output end |
Instance Method Details
#inspect ⇒ Object
11 12 13 |
# File 'lib/linux_admin/command_result.rb', line 11 def inspect "#{to_s.chop} @exit_status=#{@exit_status}>" end |