Class: CurationConcerns::StateWorkflow

Inherits:
Object
  • Object
show all
Defined in:
app/models/curation_concerns/state_workflow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state) ⇒ StateWorkflow

Returns a new instance of StateWorkflow.

Parameters:

  • state (String, RDF::Term)

    a represesentation of the workflow



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

#stateObject (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

Returns:

  • (Boolean)


9
10
11
# File 'app/models/curation_concerns/state_workflow.rb', line 9

def pending?
  state == :pending
end