Class: HalfShell::Result
- Inherits:
-
Object
- Object
- HalfShell::Result
- Defined in:
- lib/half_shell/result.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(command, status, stdout, stderr) ⇒ Result
constructor
A new instance of Result.
- #to_s ⇒ Object
Constructor Details
#initialize(command, status, stdout, stderr) ⇒ Result
Returns a new instance of Result.
5 6 7 8 |
# File 'lib/half_shell/result.rb', line 5 def initialize(command, status, stdout, stderr) @command = command @status, @stdout, @stderr = status, stdout, stderr end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
3 4 5 |
# File 'lib/half_shell/result.rb', line 3 def command @command end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/half_shell/result.rb', line 3 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
3 4 5 |
# File 'lib/half_shell/result.rb', line 3 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
3 4 5 |
# File 'lib/half_shell/result.rb', line 3 def stdout @stdout end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/half_shell/result.rb', line 10 def to_s %Q{#<HalfShell::Result command="#{shorten(command)}" status=#{status} stdout="#{shorten(stdout)}" stderr="#{shorten(stderr)}">} end |