Class: CurationConcerns::InspectWorkPresenter
- Inherits:
-
Object
- Object
- CurationConcerns::InspectWorkPresenter
- Defined in:
- app/presenters/curation_concerns/inspect_work_presenter.rb
Instance Attribute Summary collapse
-
#current_ability ⇒ Object
readonly
Returns the value of attribute current_ability.
-
#solr_document ⇒ Object
readonly
Returns the value of attribute solr_document.
Instance Method Summary collapse
-
#initialize(solr_document, current_ability) ⇒ InspectWorkPresenter
constructor
A new instance of InspectWorkPresenter.
- #solr ⇒ Object
- #workflow ⇒ Object
Constructor Details
#initialize(solr_document, current_ability) ⇒ InspectWorkPresenter
Returns a new instance of InspectWorkPresenter.
3 4 5 6 |
# File 'app/presenters/curation_concerns/inspect_work_presenter.rb', line 3 def initialize(solr_document, current_ability) @solr_document = solr_document @current_ability = current_ability end |
Instance Attribute Details
#current_ability ⇒ Object (readonly)
Returns the value of attribute current_ability.
7 8 9 |
# File 'app/presenters/curation_concerns/inspect_work_presenter.rb', line 7 def current_ability @current_ability end |
#solr_document ⇒ Object (readonly)
Returns the value of attribute solr_document.
7 8 9 |
# File 'app/presenters/curation_concerns/inspect_work_presenter.rb', line 7 def solr_document @solr_document end |
Instance Method Details
#solr ⇒ Object
23 24 25 |
# File 'app/presenters/curation_concerns/inspect_work_presenter.rb', line 23 def solr @solr_document.inspect end |
#workflow ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/presenters/curation_concerns/inspect_work_presenter.rb', line 9 def workflow return { comments: [], roles: [] } unless sipity_entity { entity_id: sipity_entity.id, proxy_for: sipity_entity.proxy_for_global_id, workflow_id: sipity_entity.workflow_id, workflow_name: sipity_entity.workflow_name, state_id: sipity_entity.workflow_state_id, state_name: sipity_entity.workflow_state_name, comments: workflow_comments, roles: sipity_entity_roles } end |