Class: PanelsFor::Rails::PanelsForHelper::PanelBuilder
- Inherits:
-
Object
- Object
- PanelsFor::Rails::PanelsForHelper::PanelBuilder
- Includes:
- ActionView::Helpers, FontAwesome::Rails::IconHelper
- Defined in:
- app/helpers/panels_for/rails/panels_for_helper.rb
Instance Attribute Summary collapse
-
#object ⇒ Object
Returns the value of attribute object.
-
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(object, template) ⇒ PanelBuilder
constructor
A new instance of PanelBuilder.
- #panel(name, options = {}, &block) ⇒ Object
Constructor Details
#initialize(object, template) ⇒ PanelBuilder
Returns a new instance of PanelBuilder.
17 18 19 20 |
# File 'app/helpers/panels_for/rails/panels_for_helper.rb', line 17 def initialize(object, template) @object = object @template = template end |
Instance Attribute Details
#object ⇒ Object
Returns the value of attribute object.
15 16 17 |
# File 'app/helpers/panels_for/rails/panels_for_helper.rb', line 15 def object @object end |
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
15 16 17 |
# File 'app/helpers/panels_for/rails/panels_for_helper.rb', line 15 def output_buffer @output_buffer end |
#template ⇒ Object
Returns the value of attribute template.
15 16 17 |
# File 'app/helpers/panels_for/rails/panels_for_helper.rb', line 15 def template @template end |
Instance Method Details
#panel(name, options = {}, &block) ⇒ Object
22 23 24 25 |
# File 'app/helpers/panels_for/rails/panels_for_helper.rb', line 22 def panel(name, = {}, &block) content = panel_default(name, , &block) [:collapse] ? panel_group(name, content) : content end |