Class: Fontico::Icon
- Inherits:
-
Struct
- Object
- Struct
- Fontico::Icon
- Defined in:
- lib/fontico/icon.rb
Overview
One resolved entry from the manifest: the name templates use, plus where it came from and the flags that decide which emitters accept it.
Instance Attribute Summary collapse
-
#multicolor ⇒ Object
Returns the value of attribute multicolor.
-
#name ⇒ Object
Returns the value of attribute name.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#key ⇒ Object
Sprite symbol ids and the id-namespacing prefix both derive from here, so a rename in the manifest moves them together.
- #local? ⇒ Boolean
- #multicolor? ⇒ Boolean
- #source ⇒ Object
Instance Attribute Details
#multicolor ⇒ Object
Returns the value of attribute multicolor
6 7 8 |
# File 'lib/fontico/icon.rb', line 6 def multicolor @multicolor end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/fontico/icon.rb', line 6 def name @name end |
#provider ⇒ Object
Returns the value of attribute provider
6 7 8 |
# File 'lib/fontico/icon.rb', line 6 def provider @provider end |
#slug ⇒ Object
Returns the value of attribute slug
6 7 8 |
# File 'lib/fontico/icon.rb', line 6 def slug @slug end |
Instance Method Details
#key ⇒ Object
Sprite symbol ids and the id-namespacing prefix both derive from here, so a rename in the manifest moves them together.
13 |
# File 'lib/fontico/icon.rb', line 13 def key = name.tr(".", "-") |
#local? ⇒ Boolean
8 |
# File 'lib/fontico/icon.rb', line 8 def local? = provider == "local" |
#multicolor? ⇒ Boolean
9 |
# File 'lib/fontico/icon.rb', line 9 def multicolor? = !!multicolor |
#source ⇒ Object
7 |
# File 'lib/fontico/icon.rb', line 7 def source = "#{provider}/#{slug}" |