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.
17 18 19 |
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 17 def initialize(agent) @agent = agent end |
Instance Method Details
#responsibilities ⇒ Object
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
21 22 23 |
# File 'app/presenters/hyrax/admin/workflow_roles_presenter.rb', line 21 def responsibilities_present? @agent.workflow_responsibilities.any? end |