Class: UI::TableHead

Inherits:
Phlex::HTML
  • Object
show all
Includes:
TableHeadBehavior
Defined in:
app/components/ui/table_head.rb

Instance Method Summary collapse

Methods included from TableHeadBehavior

#head_classes, #head_html_attributes, #render_head

Constructor Details

#initialize(classes: "", **attributes) ⇒ TableHead

Returns a new instance of TableHead.



6
7
8
9
# File 'app/components/ui/table_head.rb', line 6

def initialize(classes: "", **attributes)
  @classes = classes
  @attributes = attributes
end

Instance Method Details

#view_template(&block) ⇒ Object



11
12
13
14
15
# File 'app/components/ui/table_head.rb', line 11

def view_template(&block)
  th(**head_html_attributes.deep_merge(@attributes)) do
    yield if block_given?
  end
end