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.



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

def initialize(agent)
  @agent = agent
end

Instance Method Details

#responsibilitiesObject



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

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

#responsibilities_present?Boolean

Returns:

  • (Boolean)


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

def responsibilities_present?
  @agent.workflow_responsibilities.any?
end