Class: PhlexyUI::Badge
Instance Method Summary collapse
-
#initialize(as: :span) ⇒ Badge
constructor
A new instance of Badge.
- #view_template ⇒ Object
Constructor Details
#initialize(as: :span) ⇒ Badge
Returns a new instance of Badge.
5 6 7 8 |
# File 'lib/phlexy_ui/badge.rb', line 5 def initialize(*, as: :span, **) super(*, **) @as = as end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/phlexy_ui/badge.rb', line 10 def view_template(&) generate_classes!( component_html_class: :badge, modifiers_map: modifiers, base_modifiers:, options: ).then do |classes| public_send(as, class: classes, **, &) end end |