Class: Avo::Resources::Items::Sidebar::Builder

Inherits:
Object
  • Object
show all
Includes:
Concerns::BorrowItemsHolder
Defined in:
lib/avo/resources/items/sidebar.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Builder.



35
36
37
38
# File 'lib/avo/resources/items/sidebar.rb', line 35

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

Instance Method Details

#buildObject

Fetch the sidebar



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

def build
  @sidebar.items_holder = @items_holder
  @sidebar
end