Module: AyeCommander::Status::ClassMethods
- Included in:
- Command::ClassMethods
- Defined in:
- lib/aye_commander/status.rb
Overview
Status related class Methods to be included
Instance Method Summary collapse
-
#succeeds ⇒ Object
Returns and/or initializes the :@succeeds class instance variable.
-
#succeeds_with(*args, exclude_success: false) ⇒ Object
Adds extra succeeds status other than success.
Instance Method Details
#succeeds ⇒ Object
Returns and/or initializes the :@succeeds class instance variable
10 11 12 |
# File 'lib/aye_commander/status.rb', line 10 def succeeds @succeeds ||= [DEFAULT] end |
#succeeds_with(*args, exclude_success: false) ⇒ Object
Adds extra succeeds status other than success. Use exclude_success: true if for whathever reason you don’t want :success to be a successful status.
17 18 19 20 |
# File 'lib/aye_commander/status.rb', line 17 def succeeds_with(*args, exclude_success: false) @succeeds = succeeds | args @succeeds.delete(DEFAULT) if exclude_success end |