Sha256: e6ad7ea783a032d4b253309b3e3f1125e5883fb00b1d18797b50be247296dd8b
Contents?: true
Size: 960 Bytes
Versions: 7
Compression:
Stored size: 960 Bytes
Contents
require 'bh/classes/base' module Bh module Classes # @api private class Icon < Base # @return [#to_s] the class to assign to the icon based on the Vector # Icon library used. def library_class Icon.libraries[@options[:library].to_s.underscore] || @options[:library] end # @return [#to_s] the class to assign to the icon based on the name # of the icon. def name_class if name = @options[:name] "#{library_class}-#{name.to_s.gsub '_', '-'}" end end private # @return [Hash<Symbol, String>] the classes that Bootstrap requires to # append to icons for each possible vector icon library. def self.libraries HashWithIndifferentAccess.new(nil).tap do |klass| klass[:font_awesome] = :'fa' klass[:glyphicons] = :'glyphicon' klass[:''] = :'glyphicon' end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems