Class: LyberCore::Robot::ReturnState
- Inherits:
-
Object
- Object
- LyberCore::Robot::ReturnState
- Defined in:
- lib/lyber_core/return_state.rb
Constant Summary collapse
- ALLOWED_RETURN_STATES =
%w[completed skipped waiting].freeze
- DEFAULT_RETURN_STATE =
'completed'.freeze
Instance Attribute Summary collapse
-
#note ⇒ Object
Returns the value of attribute note.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ReturnState
constructor
A new instance of ReturnState.
Constructor Details
#initialize(params = {}) ⇒ ReturnState
Returns a new instance of ReturnState.
24 25 26 27 |
# File 'lib/lyber_core/return_state.rb', line 24 def initialize(params = {}) self.status = params[:status] || DEFAULT_RETURN_STATE self.note = params[:note] || '' end |
Instance Attribute Details
#note ⇒ Object
Returns the value of attribute note.
8 9 10 |
# File 'lib/lyber_core/return_state.rb', line 8 def note @note end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/lyber_core/return_state.rb', line 7 def status @status end |
Class Method Details
.COMPLETED ⇒ Object
16 17 18 |
# File 'lib/lyber_core/return_state.rb', line 16 def self.COMPLETED new(status: 'completed') end |
.SKIPPED ⇒ Object
12 13 14 |
# File 'lib/lyber_core/return_state.rb', line 12 def self.SKIPPED new(status: 'skipped') end |
.WAITING ⇒ Object
20 21 22 |
# File 'lib/lyber_core/return_state.rb', line 20 def self.WAITING new(status: 'waiting') end |