Class: Hyrax::Admin::WorkflowRolesPresenter::AgentPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/hyrax/admin/workflow_roles_presenter.rb

Instance Method Summary collapse

Constructor Details

#initialize(agent) ⇒ AgentPresenter

Returns a new instance of AgentPresenter.



16
17
18
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 16

def initialize(agent)
  @agent = agent
end

Instance Method Details

#responsibilitiesObject



24
25
26
27
28
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 24

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

#responsibilities_present?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 20

def responsibilities_present?
  @agent.workflow_responsibilities.any?
end