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

#multicolorObject

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

#nameObject

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

#providerObject

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

#slugObject

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

#keyObject

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

#sourceObject



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

def source     = "#{provider}/#{slug}"