Class: PhlexUI::Link
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(href: "#", variant: :link, size: :md, icon: false, **attrs) ⇒ Link
constructor
A new instance of Link.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(href: "#", variant: :link, size: :md, icon: false, **attrs) ⇒ Link
Returns a new instance of Link.
5 6 7 8 9 10 11 |
# File 'lib/phlex_ui/link.rb', line 5 def initialize(href: "#", variant: :link, size: :md, icon: false, **attrs) @href = href @variant = variant.to_sym @size = size.to_sym @icon = icon super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
13 14 15 |
# File 'lib/phlex_ui/link.rb', line 13 def view_template(&) a(href: @href, **attrs, &) end |