Class: LyberCore::ReturnState
- Inherits:
-
Object
- Object
- LyberCore::ReturnState
- Defined in:
- lib/lyber_core/return_state.rb
Overview
this object defines the allowed states robots can optionally return upon completion if the return value of the “perform” step is an object of this type and the status value is set an allowed value,
it will be used to set the final workflow state for that druid
Constant Summary collapse
- ALLOWED_RETURN_STATES =
%w[completed skipped waiting noop].freeze
- DEFAULT_RETURN_STATE =
'completed'
Instance Attribute Summary collapse
-
#note ⇒ Object
Returns the value of attribute note.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ReturnState
constructor
A new instance of ReturnState.
Constructor Details
#initialize(params = {}) ⇒ ReturnState
Returns a new instance of ReturnState.
14 15 16 17 |
# File 'lib/lyber_core/return_state.rb', line 14 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.
9 10 11 |
# File 'lib/lyber_core/return_state.rb', line 9 def note @note end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/lyber_core/return_state.rb', line 8 def status @status end |