Class: CurationConcerns::Admin::WorkflowRolePresenter::AgentPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/curation_concerns/admin/workflow_role_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(agent) ⇒ AgentPresenter

Returns a new instance of AgentPresenter.



15
16
17
# File 'app/presenters/curation_concerns/admin/workflow_role_presenter.rb', line 15

def initialize(agent)
  @agent = agent
end

Instance Method Details

#responsibilitiesObject



23
24
25
26
27
# File 'app/presenters/curation_concerns/admin/workflow_role_presenter.rb', line 23

def responsibilities
  @agent.workflow_responsibilities.each do |responsibility|
    yield ResponsibilityPresenter.new(responsibility)
  end
end

#responsibilities_present?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/presenters/curation_concerns/admin/workflow_role_presenter.rb', line 19

def responsibilities_present?
  @agent.workflow_responsibilities.any?
end