Class: FontawesomeCdn::Configuration
- Inherits:
-
Object
- Object
- FontawesomeCdn::Configuration
- Defined in:
- lib/fontawesome_cdn/configuration.rb
Overview
Configuration object for FontawesomeCdn.
Allows customizing default icon behavior such as:
- icon family (classic, brands, duotone, …)
- icon style (solid, regular, light, thin)
- default aria-hidden attribute
This configuration can be set in a Rails initializer:
FontawesomeCdn.configure do |config|
config.default_family = "classic"
config.default_style = "solid"
config.default_aria_hidden = true
end
Instance Attribute Summary collapse
-
#default_aria_hidden ⇒ Object
Returns the value of attribute default_aria_hidden.
-
#default_family ⇒ Object
Returns the value of attribute default_family.
-
#default_style ⇒ Object
Returns the value of attribute default_style.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 |
# File 'lib/fontawesome_cdn/configuration.rb', line 22 def initialize @default_family = :classic @default_style = :solid @default_aria_hidden = true end |
Instance Attribute Details
#default_aria_hidden ⇒ Object
Returns the value of attribute default_aria_hidden.
20 21 22 |
# File 'lib/fontawesome_cdn/configuration.rb', line 20 def default_aria_hidden @default_aria_hidden end |
#default_family ⇒ Object
Returns the value of attribute default_family.
20 21 22 |
# File 'lib/fontawesome_cdn/configuration.rb', line 20 def default_family @default_family end |
#default_style ⇒ Object
Returns the value of attribute default_style.
20 21 22 |
# File 'lib/fontawesome_cdn/configuration.rb', line 20 def default_style @default_style end |