Class: CurationConcerns::StateWorkflow
- Inherits:
-
Object
- Object
- CurationConcerns::StateWorkflow
- Defined in:
- app/models/curation_concerns/state_workflow.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(state) ⇒ StateWorkflow
constructor
A new instance of StateWorkflow.
- #pending? ⇒ Boolean
Constructor Details
#initialize(state) ⇒ StateWorkflow
Returns a new instance of StateWorkflow.
4 5 6 |
# File 'app/models/curation_concerns/state_workflow.rb', line 4 def initialize(state) @state = state.respond_to?(:to_sym) ? state.to_sym : state end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
7 8 9 |
# File 'app/models/curation_concerns/state_workflow.rb', line 7 def state @state end |
Instance Method Details
#pending? ⇒ Boolean
9 10 11 |
# File 'app/models/curation_concerns/state_workflow.rb', line 9 def pending? state == :pending end |