Class: CurationConcerns::Admin::WorkflowRolePresenter::AgentPresenter
- Inherits:
-
Object
- Object
- CurationConcerns::Admin::WorkflowRolePresenter::AgentPresenter
- Defined in:
- app/presenters/curation_concerns/admin/workflow_role_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.
15 16 17 |
# File 'app/presenters/curation_concerns/admin/workflow_role_presenter.rb', line 15 def initialize(agent) @agent = agent end |
Instance Method Details
#responsibilities ⇒ Object
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
19 20 21 |
# File 'app/presenters/curation_concerns/admin/workflow_role_presenter.rb', line 19 def responsibilities_present? @agent.workflow_responsibilities.any? end |