Class: Plutonium::UI::Panel

Inherits:
Component::Base show all
Defined in:
lib/plutonium/ui/panel.rb

Instance Method Summary collapse

Methods included from Component::Behaviour

#around_template

Methods included from Component::Tokens

#classes, #tokens

Methods included from Component::Kit

#BuildActionButton, #BuildBlock, #BuildBreadcrumbs, #BuildColorModeSelector, #BuildDynaFrameContent, #BuildDynaFrameHost, #BuildEmptyCard, #BuildFrameNavigatorPanel, #BuildPageHeader, #BuildPanel, #BuildSkeletonTable, #BuildTabList, #BuildTableInfo, #BuildTablePagination, #BuildTableScopesBar, #BuildTableSearchBar, #method_missing, #respond_to_missing?

Constructor Details

#initializePanel

Returns a new instance of Panel.



4
5
6
# File 'lib/plutonium/ui/panel.rb', line 4

def initialize
  @items = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Plutonium::UI::Component::Kit

Instance Method Details

#before_templateObject



20
21
22
23
# File 'lib/plutonium/ui/panel.rb', line 20

def before_template(&)
  vanish(&)
  super
end

#view_templateObject



25
26
27
28
29
30
# File 'lib/plutonium/ui/panel.rb', line 25

def view_template
  wrapped do
    render_toolbar if render_toolbar?
    render_content if render_content?
  end
end

#with_content(content) ⇒ Object



16
17
18
# File 'lib/plutonium/ui/panel.rb', line 16

def with_content(content)
  @content = content
end

#with_item(item) ⇒ Object



12
13
14
# File 'lib/plutonium/ui/panel.rb', line 12

def with_item(item)
  @items << item
end

#with_title(title) ⇒ Object



8
9
10
# File 'lib/plutonium/ui/panel.rb', line 8

def with_title(title)
  @title = title
end