Class: Hyrax::Workflow::ObjectInWorkflowDecorator
- Inherits:
-
ModelDecorator
- Object
- Draper::Decorator
- ModelDecorator
- Hyrax::Workflow::ObjectInWorkflowDecorator
- Defined in:
- app/services/hyrax/workflow/object_in_workflow_decorator.rb
Overview
Decorates objects with attributes with their workflow state.
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods inherited from ModelDecorator
Instance Attribute Details
#workflow=(value) ⇒ Sipity::Workflow (writeonly)
15 16 17 |
# File 'app/services/hyrax/workflow/object_in_workflow_decorator.rb', line 15 def workflow=(value) @workflow = value end |
#workflow_state ⇒ String
26 27 28 |
# File 'app/services/hyrax/workflow/object_in_workflow_decorator.rb', line 26 def workflow_state @workflow_state&.name || 'unknown' end |
Instance Method Details
#published? ⇒ Boolean
19 20 21 22 |
# File 'app/services/hyrax/workflow/object_in_workflow_decorator.rb', line 19 def published? Hyrax::Admin::WorkflowsController.deposited_workflow_state_name == workflow_state end |