Module: Jekyll::IconFilters
- Defined in:
- lib/irontask/public/components/font-awesome/src/_plugins/site.rb
Instance Method Summary collapse
- #category(icons, cat) ⇒ Object
- #expand_aliases(icons) ⇒ Object
- #sort_by(icons, sort_key) ⇒ Object
- #version(icons, version) ⇒ Object
Instance Method Details
#category(icons, cat) ⇒ Object
84 85 86 |
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 84 def category(icons, cat) icons.select { |icon| icon['categories'].include?(cat) } end |
#expand_aliases(icons) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 65 def (icons) = [] icons.each { |icon| # Remove the aliases since we are expanding them << icon.reject{ |k| k == 'aliases'} icon['aliases'].each { |alias_id| alias_icon = [-1].dup alias_icon['class'] = alias_id alias_icon['alias_of'] = icon << alias_icon } } return end |
#sort_by(icons, sort_key) ⇒ Object
92 93 94 |
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 92 def sort_by(icons, sort_key) icons.sort_by! { |icon| icon[sort_key] } end |
#version(icons, version) ⇒ Object
88 89 90 |
# File 'lib/irontask/public/components/font-awesome/src/_plugins/site.rb', line 88 def version(icons, version) icons.select { |icon| icon['created'] == version } end |