Class: PhlexIcons::Base

Inherits:
Phlex::SVG
  • Object
show all
Defined in:
lib/phlex-icons/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attrsObject (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_templateObject



14
15
16
# File 'lib/phlex-icons/base.rb', line 14

def view_template
  send(variant) if respond_to?(variant)
end