Module: AyeCommander::Status::Readable
- Included in:
- Command, Resultable::Result
- Defined in:
- lib/aye_commander/status.rb
Overview
This module defines methods that allow to read and know about the status
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#failure? ⇒ Boolean
Boolean opposite of success.
-
#success? ⇒ Boolean
Whether or not the command is succesful.
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
25 26 27 |
# File 'lib/aye_commander/status.rb', line 25 def status @status end |
Instance Method Details
#failure? ⇒ Boolean
Boolean opposite of success
33 34 35 |
# File 'lib/aye_commander/status.rb', line 33 def failure? !success? end |
#success? ⇒ Boolean
Whether or not the command is succesful
28 29 30 |
# File 'lib/aye_commander/status.rb', line 28 def success? self.class.succeeds.include?(status) end |