Class: Hyrax::CollapsableSectionPresenter
- Inherits:
-
Object
- Object
- Hyrax::CollapsableSectionPresenter
- Defined in:
- app/presenters/hyrax/collapsable_section_presenter.rb
Overview
Draws a collapsable list widget using the Bootstrap 3 / Collapse.js plugin
Instance Attribute Summary collapse
-
#icon_class ⇒ Object
readonly
Returns the value of attribute icon_class.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#open ⇒ Object
readonly
Returns the value of attribute open.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#view_context ⇒ Object
readonly
Returns the value of attribute view_context.
Instance Method Summary collapse
-
#initialize(view_context:, text:, id:, icon_class:, open:) ⇒ CollapsableSectionPresenter
constructor
A new instance of CollapsableSectionPresenter.
- #render(&block) ⇒ Object
Constructor Details
#initialize(view_context:, text:, id:, icon_class:, open:) ⇒ CollapsableSectionPresenter
Returns a new instance of CollapsableSectionPresenter.
4 5 6 7 8 9 10 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 4 def initialize(view_context:, text:, id:, icon_class:, open:) @view_context = view_context @text = text @id = id @icon_class = icon_class @open = open end |
Instance Attribute Details
#icon_class ⇒ Object (readonly)
Returns the value of attribute icon_class.
12 13 14 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 12 def icon_class @icon_class end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
12 13 14 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 12 def id @id end |
#open ⇒ Object (readonly)
Returns the value of attribute open.
12 13 14 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 12 def open @open end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
12 13 14 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 12 def text @text end |
#view_context ⇒ Object (readonly)
Returns the value of attribute view_context.
12 13 14 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 12 def view_context @view_context end |
Instance Method Details
#render(&block) ⇒ Object
15 16 17 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 15 def render(&block) + list_tag(&block) end |