Class: Dropkick::CommandResult
- Inherits:
-
Object
- Object
- Dropkick::CommandResult
- Defined in:
- lib/dropkick/command_result.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(stdout, stderr, exit_code, duration) ⇒ CommandResult
constructor
A new instance of CommandResult.
- #output ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(stdout, stderr, exit_code, duration) ⇒ CommandResult
Returns a new instance of CommandResult.
5 6 7 8 9 10 |
# File 'lib/dropkick/command_result.rb', line 5 def initialize(stdout, stderr, exit_code, duration) @stdout = stdout @stderr = stderr @exit_code = exit_code @duration = duration end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/dropkick/command_result.rb', line 3 def duration @duration end |
#stderr ⇒ Object
Returns the value of attribute stderr.
3 4 5 |
# File 'lib/dropkick/command_result.rb', line 3 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
3 4 5 |
# File 'lib/dropkick/command_result.rb', line 3 def stdout @stdout end |
Instance Method Details
#errors ⇒ Object
16 17 18 |
# File 'lib/dropkick/command_result.rb', line 16 def errors @stderr end |
#output ⇒ Object
12 13 14 |
# File 'lib/dropkick/command_result.rb', line 12 def output @stdout end |
#successful? ⇒ Boolean
20 21 22 |
# File 'lib/dropkick/command_result.rb', line 20 def successful? @exit_code == 0 end |