Class: Fontico::Icon

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#multicolor ⇒ Object

Returns the value of attribute multicolor

Returns:

  • (Object) —

    the current value of multicolor



6
7
8
# File 'lib/fontico/icon.rb', line 6

def multicolor
  @multicolor
end

#name ⇒ Object

Returns the value of attribute name

Returns:

  • (Object) —

    the current value of name



6
7
8
# File 'lib/fontico/icon.rb', line 6

def name
  @name
end

#provider ⇒ Object

Returns the value of attribute provider

Returns:

  • (Object) —

    the current value of provider



6
7
8
# File 'lib/fontico/icon.rb', line 6

def provider
  @provider
end

#slug ⇒ Object

Returns the value of attribute slug

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Boolean)


8
# File 'lib/fontico/icon.rb', line 8

def local?     = provider == "local"

#multicolor? ⇒ Boolean

Returns:

  • (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}"