Class: Hyrax::Admin::WorkflowRolesPresenter::AgentPresenter
- Inherits:
-
Object
- Object
- Hyrax::Admin::WorkflowRolesPresenter::AgentPresenter
- Defined in:
- app/presenters/hyrax/admin/workflow_roles_presenter.rb
Instance Method Summary collapse
-
#initialize(agent) ⇒ AgentPresenter
constructor
A new instance of AgentPresenter.
- #responsibilities ⇒ Object
- #responsibilities_present? ⇒ Boolean
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
#responsibilities ⇒ Object
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
20 21 22 |
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 20 def responsibilities_present? @agent.workflow_responsibilities.any? end |