Class: PhlexUI::Command::Group

Inherits:
Base
  • Object
show all
Defined in:
lib/phlex_ui/command/group.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#before_template

Constructor Details

#initialize(title: nil, **attrs) ⇒ Group

Returns a new instance of Group.



5
6
7
8
# File 'lib/phlex_ui/command/group.rb', line 5

def initialize(title: nil, **attrs)
  @title = title
  super(**attrs)
end

Instance Method Details

#view_template(&block) ⇒ Object



10
11
12
13
14
15
# File 'lib/phlex_ui/command/group.rb', line 10

def view_template(&block)
  div(**attrs) do
    render_header if @title
    render_items(&block)
  end
end