Class: PhlexIcons::Base
- Inherits:
-
Phlex::SVG
- Object
- Phlex::SVG
- PhlexIcons::Base
- Defined in:
- lib/phlex-icons/base.rb
Direct Known Subclasses
Hero::Base, Hero::Cog, Hero::Eye, Hero::Gif, Hero::H1, Hero::H2, Hero::H3, Hero::Key, Hero::Map, Hero::Rss, Hero::Sun, Hero::Tag, Hero::Tv
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ Base
constructor
A new instance of Base.
- #view_template ⇒ Object
Constructor Details
#initialize(**attrs) ⇒ Base
Returns a new instance of Base.
7 8 9 10 11 12 |
# File 'lib/phlex-icons/base.rb', line 7 def initialize(**attrs) @attrs = attrs attrs[:class] ||= PhlexIcons.configuration.default_classes super() end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
5 6 7 |
# File 'lib/phlex-icons/base.rb', line 5 def attrs @attrs end |
Instance Method Details
#view_template ⇒ Object
14 15 16 |
# File 'lib/phlex-icons/base.rb', line 14 def view_template send(variant) if respond_to?(variant) end |