Class: Foodtaster::Vm::ExecResult
- Inherits:
-
Object
- Object
- Foodtaster::Vm::ExecResult
- Defined in:
- lib/foodtaster/vm.rb
Instance Attribute Summary collapse
-
#exit_status ⇒ Object
readonly
Returns the value of attribute exit_status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(hash) ⇒ ExecResult
constructor
A new instance of ExecResult.
- #successful? ⇒ Boolean
Constructor Details
#initialize(hash) ⇒ ExecResult
Returns a new instance of ExecResult.
10 11 12 13 14 15 16 |
# File 'lib/foodtaster/vm.rb', line 10 def initialize(hash) if hash @stderr = hash[:stderr].to_s.chomp @stdout = hash[:stdout].to_s.chomp @exit_status = hash[:exit_status] end end |
Instance Attribute Details
#exit_status ⇒ Object (readonly)
Returns the value of attribute exit_status.
8 9 10 |
# File 'lib/foodtaster/vm.rb', line 8 def exit_status @exit_status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
6 7 8 |
# File 'lib/foodtaster/vm.rb', line 6 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
7 8 9 |
# File 'lib/foodtaster/vm.rb', line 7 def stdout @stdout end |
Instance Method Details
#successful? ⇒ Boolean
18 19 20 |
# File 'lib/foodtaster/vm.rb', line 18 def successful? exit_status == 0 end |