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

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

Constant Summary

Constants included from Concerns::HasFieldDiscovery

Concerns::HasFieldDiscovery::COLUMN_NAMES_TO_IGNORE

Instance Method Summary collapse

Methods included from Concerns::HasFieldDiscovery

#discover_associations, #discover_columns, #model_db_columns

Constructor Details

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

Returns a new instance of Builder.



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

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



43
44
45
46
# File 'lib/avo/resources/items/sidebar.rb', line 43

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