Class: Avo::PanelBuilder
- Inherits:
-
Object
- Object
- Avo::PanelBuilder
- Defined in:
- lib/avo/panel_builder.rb
Instance Attribute Summary collapse
-
#items_holder ⇒ Object
readonly
Returns the value of attribute items_holder.
Class Method Summary collapse
Instance Method Summary collapse
-
#build ⇒ Object
Fetch the tab.
-
#initialize(name: nil, **args) ⇒ PanelBuilder
constructor
A new instance of PanelBuilder.
Constructor Details
#initialize(name: nil, **args) ⇒ PanelBuilder
Returns a new instance of PanelBuilder.
14 15 16 17 |
# File 'lib/avo/panel_builder.rb', line 14 def initialize(name: nil, **args) @panel = Avo::Panel.new(name: name, **args) @items_holder = Avo::ItemsHolder.new end |
Instance Attribute Details
#items_holder ⇒ Object (readonly)
Returns the value of attribute items_holder.
12 13 14 |
# File 'lib/avo/panel_builder.rb', line 12 def items_holder @items_holder end |
Class Method Details
.parse_block(**args, &block) ⇒ Object
3 4 5 |
# File 'lib/avo/panel_builder.rb', line 3 def parse_block(**args, &block) Docile.dsl_eval(new(**args), &block).build end |
Instance Method Details
#build ⇒ Object
Fetch the tab
20 21 22 23 |
# File 'lib/avo/panel_builder.rb', line 20 def build @panel.items_holder = @items_holder @panel end |