Class: CurationConcerns::WorkflowActionInfo

Inherits:
Object
  • Object
show all
Defined in:
app/models/curation_concerns/workflow_action_info.rb

Overview

A simple data object for holding a user, work and their workflow proxies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(work, user) ⇒ WorkflowActionInfo

Returns a new instance of WorkflowActionInfo.



4
5
6
7
8
9
# File 'app/models/curation_concerns/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

#agentObject (readonly)

Returns the value of attribute agent.



11
12
13
# File 'app/models/curation_concerns/workflow_action_info.rb', line 11

def agent
  @agent
end

#entityObject (readonly)

Returns the value of attribute entity.



11
12
13
# File 'app/models/curation_concerns/workflow_action_info.rb', line 11

def entity
  @entity
end

#userObject (readonly)

Returns the value of attribute user.



11
12
13
# File 'app/models/curation_concerns/workflow_action_info.rb', line 11

def user
  @user
end

#workObject (readonly)

Returns the value of attribute work.



11
12
13
# File 'app/models/curation_concerns/workflow_action_info.rb', line 11

def work
  @work
end