Sha256: c1351acc69ca3f63c80e9dd6654832ddf9f802f65e43d077358682ac5e0ac3b5

Contents?: true

Size: 507 Bytes

Versions: 25

Compression:

Stored size: 507 Bytes

Contents

class Avo::Panel
  include Avo::Concerns::IsResourceItem
  include Avo::Concerns::VisibleItems

  class_attribute :item_type, default: :panel

  attr_reader :name
  attr_reader :view
  attr_reader :description
  attr_accessor :items_holder

  delegate :items, :add_item, to: :items_holder

  def initialize(name: nil, description: nil, view: nil)
    @name = name
    @view = view
    @description = description
    @items_holder = Avo::ItemsHolder.new
  end

  def has_items?
    @items.present?
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
avo-2.53.0 lib/avo/panel.rb
avo-2.52.0 lib/avo/panel.rb
avo-2.49.0 lib/avo/panel.rb
avo-2.48.0 lib/avo/panel.rb
avo-2.47.0 lib/avo/panel.rb
avo-2.46.0 lib/avo/panel.rb
avo-2.45.0 lib/avo/panel.rb
avo-2.44.0 lib/avo/panel.rb
avo-2.43.0 lib/avo/panel.rb
avo-2.42.2 lib/avo/panel.rb
avo-2.42.1 lib/avo/panel.rb
avo-2.42.0 lib/avo/panel.rb
avo-2.41.0 lib/avo/panel.rb
avo-2.40.0 lib/avo/panel.rb
avo-2.39.0 lib/avo/panel.rb
avo-2.38.0 lib/avo/panel.rb
avo-2.37.2 lib/avo/panel.rb
avo-2.37.1 lib/avo/panel.rb
avo-2.37.0 lib/avo/panel.rb
avo-2.36.3 lib/avo/panel.rb