Class: CommonMob::Shell::ShellResult
- Inherits:
-
Struct
- Object
- Struct
- CommonMob::Shell::ShellResult
- Defined in:
- lib/common_mob/shell.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#process_result ⇒ Object
Returns the value of attribute process_result.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options
72 73 74 |
# File 'lib/common_mob/shell.rb', line 72 def @options end |
#process_result ⇒ Object
Returns the value of attribute process_result
72 73 74 |
# File 'lib/common_mob/shell.rb', line 72 def process_result @process_result end |
#stderr ⇒ Object
Returns the value of attribute stderr
72 73 74 |
# File 'lib/common_mob/shell.rb', line 72 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout
72 73 74 |
# File 'lib/common_mob/shell.rb', line 72 def stdout @stdout end |
Instance Method Details
#ensure_ok! ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/common_mob/shell.rb', line 77 def ensure_ok! unless ok? ex = ShellError.new("unable to run options=#{.inspect}\noutput=#{stdout}\nerror=#{stderr}") ex.result = self raise(ex) end end |
#ok? ⇒ Boolean
73 74 75 |
# File 'lib/common_mob/shell.rb', line 73 def ok? process_result.success? end |