Class: Avo::Resources::Items::Tab::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/avo/resources/items/tab.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, **args) ⇒ Builder

Returns a new instance of Builder.



49
50
51
52
# File 'lib/avo/resources/items/tab.rb', line 49

def initialize(name: nil, **args)
  @tab = Avo::Resources::Items::Tab.new(name: name, **args)
  @items_holder = Avo::Resources::Items::Holder.new
end

Instance Attribute Details

#items_holderObject (readonly)

Returns the value of attribute items_holder.



42
43
44
# File 'lib/avo/resources/items/tab.rb', line 42

def items_holder
  @items_holder
end

Class Method Details

.parse_block(**args, &block) ⇒ Object



37
38
39
# File 'lib/avo/resources/items/tab.rb', line 37

def parse_block(**args, &block)
  Docile.dsl_eval(new(**args), &block).build
end

Instance Method Details

#buildObject

Fetch the tab



55
56
57
58
# File 'lib/avo/resources/items/tab.rb', line 55

def build
  @tab.items_holder = @items_holder
  @tab
end