Sha256: 6e2a1d343ac20ea1706b30fd65f5a96fcb65a608468f30225c5529250c1dc5c9
Contents?: true
Size: 719 Bytes
Versions: 19
Compression:
Stored size: 719 Bytes
Contents
# frozen_string_literal: true module Hyrax module Workflow ## # Decorates objects with attributes with their workflow state. class ObjectInWorkflowDecorator < Hyrax::ModelDecorator delegate_all ## # @!attribute [w] workflow # @return [Sipity::Workflow] # @!attribute [w] workflow_state # @return [Sipity::WorkflowState] attr_writer :workflow, :workflow_state ## # @return [Boolean] def published? Hyrax::Admin::WorkflowsController.deposited_workflow_state_name == workflow_state end ## # @return [String] def workflow_state @workflow_state&.name || 'unknown' end end end end
Version data entries
19 entries across 19 versions & 1 rubygems