Class: Hyrax::WorkflowActionInfo
- Inherits:
-
Object
- Object
- Hyrax::WorkflowActionInfo
- Defined in:
- app/models/hyrax/workflow_action_info.rb
Overview
A simple data object for holding a user, work and their workflow proxies
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#work ⇒ Object
readonly
Returns the value of attribute work.
Instance Method Summary collapse
-
#initialize(work, user) ⇒ WorkflowActionInfo
constructor
A new instance of WorkflowActionInfo.
Constructor Details
#initialize(work, user) ⇒ WorkflowActionInfo
Returns a new instance of WorkflowActionInfo.
4 5 6 7 8 9 |
# File 'app/models/hyrax/workflow_action_info.rb', line 4 def initialize(work, user) @work = work @user = user @entity = PowerConverter.convert(work, to: :sipity_entity) @agent = PowerConverter.convert(user, to: :sipity_agent) end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
11 12 13 |
# File 'app/models/hyrax/workflow_action_info.rb', line 11 def agent @agent end |
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
11 12 13 |
# File 'app/models/hyrax/workflow_action_info.rb', line 11 def entity @entity end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
11 12 13 |
# File 'app/models/hyrax/workflow_action_info.rb', line 11 def user @user end |
#work ⇒ Object (readonly)
Returns the value of attribute work.
11 12 13 |
# File 'app/models/hyrax/workflow_action_info.rb', line 11 def work @work end |