Class: Maestro::Util::Shell::ExitCode
- Inherits:
-
Object
- Object
- Maestro::Util::Shell::ExitCode
- Defined in:
- lib/util/shell.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
Instance Method Summary collapse
-
#initialize(status) ⇒ ExitCode
constructor
A new instance of ExitCode.
- #success? ⇒ Boolean
Constructor Details
#initialize(status) ⇒ ExitCode
Returns a new instance of ExitCode.
18 19 20 |
# File 'lib/util/shell.rb', line 18 def initialize(status) @exit_code = status.exitstatus end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
16 17 18 |
# File 'lib/util/shell.rb', line 16 def exit_code @exit_code end |
Instance Method Details
#success? ⇒ Boolean
22 23 24 |
# File 'lib/util/shell.rb', line 22 def success? @exit_code == 0 end |