Class: Sufia::Workflow::WorkflowByAdminSetStrategy
- Inherits:
-
Object
- Object
- Sufia::Workflow::WorkflowByAdminSetStrategy
- Defined in:
- app/services/sufia/workflow/workflow_by_admin_set_strategy.rb
Instance Method Summary collapse
-
#initialize(_work, attributes) ⇒ WorkflowByAdminSetStrategy
constructor
A new instance of WorkflowByAdminSetStrategy.
-
#workflow_name ⇒ String
The name of the workflow by admin_set to use.
Constructor Details
#initialize(_work, attributes) ⇒ WorkflowByAdminSetStrategy
4 5 6 |
# File 'app/services/sufia/workflow/workflow_by_admin_set_strategy.rb', line 4 def initialize(_work, attributes) @admin_set_id = attributes[:admin_set_id] if attributes[:admin_set_id].present? end |
Instance Method Details
#workflow_name ⇒ String
9 10 11 12 |
# File 'app/services/sufia/workflow/workflow_by_admin_set_strategy.rb', line 9 def workflow_name return 'default' unless @admin_set_id Sufia::PermissionTemplate.find_by!(admin_set_id: @admin_set_id).workflow_name end |