Class: AccordionBuilderHelper::AccordionBuilder
- Inherits:
-
Object
- Object
- AccordionBuilderHelper::AccordionBuilder
- Defined in:
- app/builders/accordion_builder_helper.rb
Instance Attribute Summary collapse
-
#fieldset_rendered_counter ⇒ Object
readonly
Returns the value of attribute fieldset_rendered_counter.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(opts, parent) ⇒ AccordionBuilder
constructor
A new instance of AccordionBuilder.
- #pane(title, fieldset_opts = {}, &block) ⇒ Object
Constructor Details
#initialize(opts, parent) ⇒ AccordionBuilder
Returns a new instance of AccordionBuilder.
16 17 18 19 20 |
# File 'app/builders/accordion_builder_helper.rb', line 16 def initialize(opts, parent) @fieldset_rendered_counter = 0 @parent = parent @opts = opts end |
Instance Attribute Details
#fieldset_rendered_counter ⇒ Object (readonly)
Returns the value of attribute fieldset_rendered_counter.
13 14 15 |
# File 'app/builders/accordion_builder_helper.rb', line 13 def fieldset_rendered_counter @fieldset_rendered_counter end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
13 14 15 |
# File 'app/builders/accordion_builder_helper.rb', line 13 def opts @opts end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
13 14 15 |
# File 'app/builders/accordion_builder_helper.rb', line 13 def parent @parent end |
Instance Method Details
#pane(title, fieldset_opts = {}, &block) ⇒ Object
22 23 24 25 26 |
# File 'app/builders/accordion_builder_helper.rb', line 22 def pane(title, fieldset_opts = {}, &block) content_tag(:div, :class => 'accordion-group') do heading(title, fieldset_opts) + body(title, fieldset_opts, &block) end end |