Class: UI::H1
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::H1
- Defined in:
- app/components/ui/h1.rb
Instance Method Summary collapse
-
#initialize(classes: nil, **attributes) ⇒ H1
constructor
A new instance of H1.
- #view_template(&block) ⇒ Object
Constructor Details
#initialize(classes: nil, **attributes) ⇒ H1
Returns a new instance of H1.
5 6 7 8 |
# File 'app/components/ui/h1.rb', line 5 def initialize(classes: nil, **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
10 11 12 13 14 |
# File 'app/components/ui/h1.rb', line 10 def view_template(&block) extend UI::H1Behavior h1(**h1_html_attributes.merge(@attributes), &block) end |