Class: Avo::TabBuilder
- Inherits:
-
Object
- Object
- Avo::TabBuilder
- Defined in:
- lib/avo/tab_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) ⇒ TabBuilder
constructor
A new instance of TabBuilder.
Constructor Details
#initialize(name: nil, **args) ⇒ TabBuilder
Returns a new instance of TabBuilder.
15 16 17 18 |
# File 'lib/avo/tab_builder.rb', line 15 def initialize(name: nil, **args) @tab = Avo::Tab.new(name: name, **args) @items_holder = Avo::ItemsHolder.new end |
Instance Attribute Details
#items_holder ⇒ Object (readonly)
Returns the value of attribute items_holder.
8 9 10 |
# File 'lib/avo/tab_builder.rb', line 8 def items_holder @items_holder end |
Class Method Details
.parse_block(**args, &block) ⇒ Object
3 4 5 |
# File 'lib/avo/tab_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
21 22 23 24 |
# File 'lib/avo/tab_builder.rb', line 21 def build @tab.items_holder = @items_holder @tab end |