Class: Vident::Phlex::HTML
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- Vident::Phlex::HTML
- Includes:
- Component
- Defined in:
- lib/vident/phlex/html.rb
Class Method Summary collapse
-
.attribute(name, **options) ⇒ Object
Phlex uses a DSL to define the document, and those methods could easily clash with our attribute accessors.
Instance Method Summary collapse
-
#parent_element(**options) ⇒ Object
(also: #root)
Helper to create the main element.
Class Method Details
.attribute(name, **options) ⇒ Object
Phlex uses a DSL to define the document, and those methods could easily clash with our attribute accessors. Therefore in Phlex components we do not create attribute accessors, and instead use instance variables directly.
12 13 14 15 |
# File 'lib/vident/phlex/html.rb', line 12 def attribute(name, **) [:delegates] = false super end |
Instance Method Details
#parent_element(**options) ⇒ Object Also known as: root
Helper to create the main element
19 20 21 |
# File 'lib/vident/phlex/html.rb', line 19 def parent_element(**) @parent_element ||= RootComponent.new(**parent_element_attributes()) end |