Class: Jekyll::Icon

Inherits:
Object
  • Object
show all
Defined in:
lib/irontask/public/components/font-awesome/src/_plugins/site.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(icon_object) ⇒ Icon

Returns a new instance of Icon.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 13

def initialize(icon_object)
  @icon_object = icon_object

  # Class name used in CSS and HTML
  @icon_object['class'] = icon_object['id']
  # Normalize the aliases
  @icon_object['aliases'] ||= []

  @name = icon_object['name']
  @id = icon_object['id']
  @class = icon_object['class']
  @aliases = icon_object['aliases']
  @unicode = icon_object['unicode']
  @created = icon_object['created']
  @categories = icon_object['categories']
end

Instance Attribute Details

#categoriesObject (readonly)

Returns the value of attribute categories.



11
12
13
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 11

def categories
  @categories
end

#createdObject (readonly)

Returns the value of attribute created.



11
12
13
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 11

def created
  @created
end

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 11

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 11

def name
  @name
end

#unicodeObject (readonly)

Returns the value of attribute unicode.



11
12
13
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 11

def unicode
  @unicode
end

Instance Method Details

#to_liquidObject



30
31
32
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 30

def to_liquid
  return @icon_object
end