Class: UI::DrawerDescription

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

Instance Method Summary collapse

Methods included from DrawerDescriptionBehavior

#drawer_description_base_classes, #drawer_description_classes, #drawer_description_html_attributes

Constructor Details

#initialize(classes: nil, **attributes) ⇒ DrawerDescription

Returns a new instance of DrawerDescription.



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

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

Instance Method Details

#view_template(&block) ⇒ Object



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

def view_template(&block)
  p(**drawer_description_html_attributes) do
    yield if block_given?
  end
end