Class: RailsBootstrapHelpers::Renderers::AccordionRenderer

Inherits:
Renderer
  • Object
show all
Defined in:
lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb

Defined Under Namespace

Classes: AccordionContext, Selector

Instance Attribute Summary

Attributes inherited from Renderer

#template

Instance Method Summary collapse

Methods inherited from Renderer

#method_missing

Constructor Details

#initialize(template, id, &block) ⇒ AccordionRenderer

Returns a new instance of AccordionRenderer.



3
4
5
6
7
8
# File 'lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb', line 3

def initialize (template, id, &block)
  super template
  @id = id
  @block = block
  @selector = Selector.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RailsBootstrapHelpers::Renderers::Renderer

Instance Method Details

#renderObject



10
11
12
13
14
# File 'lib/rails-bootstrap-helpers/renderers/accordion_renderer.rb', line 10

def render
  @context = AccordionContext.new(self)
  block.call(context)
  build_accordion
end