Class: Arara::MaterialIconComponent
- Inherits:
-
ActionView::Component::Base
- Object
- ActionView::Component::Base
- Arara::MaterialIconComponent
- Includes:
- BaseComponent
- Defined in:
- app/components/arara/material_icon_component.rb
Instance Method Summary collapse
- #content ⇒ Object
- #default_html_class ⇒ Object
-
#initialize(icon:, **kw) ⇒ MaterialIconComponent
constructor
A new instance of MaterialIconComponent.
Methods included from BaseComponent
#default_data_controller, #default_html_tag, #html_class, #html_content, #html_data, #html_options, #html_tag, included
Constructor Details
#initialize(icon:, **kw) ⇒ MaterialIconComponent
Returns a new instance of MaterialIconComponent.
5 6 7 8 |
# File 'app/components/arara/material_icon_component.rb', line 5 def initialize(icon:, **kw) super(tag: "i", **kw) @icon = icon end |
Instance Method Details
#content ⇒ Object
14 15 16 |
# File 'app/components/arara/material_icon_component.rb', line 14 def content @icon end |
#default_html_class ⇒ Object
10 11 12 |
# File 'app/components/arara/material_icon_component.rb', line 10 def default_html_class "material-icons" end |