Sha256: f25462b7558e0e6182818a7524e138c603086b06de13719827f9fad44733a6a6
Contents?: true
Size: 988 Bytes
Versions: 2
Compression:
Stored size: 988 Bytes
Contents
module Wobapphelpers module Helpers module IconHelper PREDEFINED_ICONS = { attachment: 'file', back: 'arrow-left', calendar: 'calendar', cancel: 'trash', closed: 'lock', copy: 'clone', delete: 'trash', document: 'file', download: 'download', edit: 'pencil', help: 'question', info: 'info', left: 'arrow-left', new: 'plus', ok: 'check', open: 'folder-open', print: 'print', right: 'arrow-right', show: 'eye', star: 'star', up: 'arrow-up', } def icon(what) raw(%Q[<i class="fa fa-#{what} fa-fw" aria-hidden="true"></i>]) end PREDEFINED_ICONS.each do |key,value| define_method :"icon_#{key}" do icon(value) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wobapphelpers-3.1.1 | lib/wobapphelpers/helpers/icon_helper.rb |
wobapphelpers-3.1.0 | lib/wobapphelpers/helpers/icon_helper.rb |