Class: Avo::Panel
- Inherits:
-
Object
- Object
- Avo::Panel
- Includes:
- Concerns::IsResourceItem
- Defined in:
- lib/avo/panel.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#items_holder ⇒ Object
Returns the value of attribute items_holder.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add_item(item) ⇒ Object
- #has_items? ⇒ Boolean
-
#initialize(name: nil, description: nil) ⇒ Panel
constructor
A new instance of Panel.
Methods included from Concerns::IsResourceItem
#is_field?, #is_main_panel?, #is_panel?, #is_sidebar?, #is_tab?, #is_tab_group?, #is_tool?
Constructor Details
#initialize(name: nil, description: nil) ⇒ Panel
Returns a new instance of Panel.
12 13 14 15 16 |
# File 'lib/avo/panel.rb', line 12 def initialize(name: nil, description: nil) @name = name @description = description @items_holder = Avo::ItemsHolder.new end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/avo/panel.rb', line 7 def description @description end |
#items_holder ⇒ Object
Returns the value of attribute items_holder.
8 9 10 |
# File 'lib/avo/panel.rb', line 8 def items_holder @items_holder end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/avo/panel.rb', line 6 def name @name end |
Instance Method Details
#add_item(item) ⇒ Object
18 19 20 |
# File 'lib/avo/panel.rb', line 18 def add_item(item) @items << item end |
#has_items? ⇒ Boolean
22 23 24 |
# File 'lib/avo/panel.rb', line 22 def has_items? @items.present? end |