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
rubocop:enable Metrics/ParameterLists.
-
#id ⇒ Object
readonly
rubocop:enable Metrics/ParameterLists.
-
#open ⇒ Object
readonly
rubocop:enable Metrics/ParameterLists.
-
#text ⇒ Object
readonly
rubocop:enable Metrics/ParameterLists.
-
#title ⇒ Object
readonly
rubocop:enable Metrics/ParameterLists.
-
#view_context ⇒ Object
readonly
rubocop:enable Metrics/ParameterLists.
Instance Method Summary collapse
-
#initialize(view_context:, text:, id:, icon_class:, open:, title: nil) ⇒ CollapsableSectionPresenter
constructor
rubocop:disable Metrics/ParameterLists.
- #render(&block) ⇒ Object
Constructor Details
#initialize(view_context:, text:, id:, icon_class:, open:, title: nil) ⇒ CollapsableSectionPresenter
rubocop:disable Metrics/ParameterLists
6 7 8 9 10 11 12 13 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 6 def initialize(view_context:, text:, id:, icon_class:, open:, title: nil) @view_context = view_context @text = text @id = id @icon_class = icon_class @open = open @title = title end |
Instance Attribute Details
#icon_class ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def icon_class @icon_class end |
#id ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def id @id end |
#open ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def open @open end |
#text ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def text @text end |
#title ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def title @title end |
#view_context ⇒ Object (readonly)
rubocop:enable Metrics/ParameterLists
16 17 18 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 16 def view_context @view_context end |
Instance Method Details
#render(&block) ⇒ Object
19 20 21 |
# File 'app/presenters/hyrax/collapsable_section_presenter.rb', line 19 def render(&block) + list_tag(&block) end |