Class: Dor::StateService
- Inherits:
-
Object
- Object
- Dor::StateService
- Defined in:
- lib/dor/services/state_service.rb
Instance Method Summary collapse
- #allows_modification? ⇒ Boolean
-
#initialize(pid) ⇒ StateService
constructor
A new instance of StateService.
Constructor Details
#initialize(pid) ⇒ StateService
Returns a new instance of StateService.
5 6 7 |
# File 'lib/dor/services/state_service.rb', line 5 def initialize(pid) @pid = pid end |
Instance Method Details
#allows_modification? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/dor/services/state_service.rb', line 9 def allows_modification? !client.lifecycle('dor', pid, 'submitted') || client.active_lifecycle('dor', pid, 'opened') || client.workflow_status('dor', pid, 'accessionWF', 'sdr-ingest-transfer') == 'hold' end |