Class: UI::P
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::P
- Defined in:
- app/components/ui/p.rb
Instance Method Summary collapse
-
#initialize(classes: nil, **attributes) ⇒ P
constructor
A new instance of P.
- #view_template(&block) ⇒ Object
Constructor Details
#initialize(classes: nil, **attributes) ⇒ P
Returns a new instance of P.
5 6 7 8 |
# File 'app/components/ui/p.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/p.rb', line 10 def view_template(&block) extend UI::PBehavior p(**p_html_attributes.merge(@attributes), &block) end |