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
this is a glorified Struct that resolves Sipity::Enitity(work) and Sipity::Agent(user) for the input given, then provides readers for its instance variables.
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.
21 22 23 24 25 26 |
# File 'app/models/hyrax/workflow_action_info.rb', line 21 def initialize(work, user) @work = work @user = user @entity = Sipity::Entity(work) @agent = Sipity::Agent(user) end |
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent.
28 29 30 |
# File 'app/models/hyrax/workflow_action_info.rb', line 28 def agent @agent end |
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
28 29 30 |
# File 'app/models/hyrax/workflow_action_info.rb', line 28 def entity @entity end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
28 29 30 |
# File 'app/models/hyrax/workflow_action_info.rb', line 28 def user @user end |
#work ⇒ Object (readonly)
Returns the value of attribute work.
28 29 30 |
# File 'app/models/hyrax/workflow_action_info.rb', line 28 def work @work end |