Class: RailsBootstrapHelpers::Renderers::AccordionRenderer::AccordionContext
- Inherits:
-
Object
- Object
- RailsBootstrapHelpers::Renderers::AccordionRenderer::AccordionContext
- Defined in:
- lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb
Defined Under Namespace
Classes: Group
Instance Attribute Summary collapse
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
Instance Method Summary collapse
- #group(heading, &block) ⇒ Object
-
#initialize(renderer) ⇒ AccordionContext
constructor
A new instance of AccordionContext.
Constructor Details
#initialize(renderer) ⇒ AccordionContext
Returns a new instance of AccordionContext.
71 72 73 74 |
# File 'lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb', line 71 def initialize (renderer) @renderer = renderer @groups = [] end |
Instance Attribute Details
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
69 70 71 |
# File 'lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb', line 69 def groups @groups end |
Instance Method Details
#group(heading, &block) ⇒ Object
76 77 78 |
# File 'lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb', line 76 def group (heading, &block) @groups << Group.new(heading, block) end |