Sha256: 1abdab25c42e7ef138f58ab77c05cabf6bd6e0622c6b6d17a9d1a6ebd2ab1914
Contents?: true
Size: 531 Bytes
Versions: 2
Compression:
Stored size: 531 Bytes
Contents
module BootstrapIt # module ViewHelpers # # Icon # # @author [alexiss] # class Icon < WrapIt::Base omit_content after_initialize do @tag = 'i' @icon = @arguments.extract_first!(Symbol, String) @icon.nil? && @icon = 'asterisk' @icon = @icon.to_s prefix = BootstrapIt.config.font_awesome ? 'fa' : 'glyphicon' add_html_class [prefix, "#{prefix}-#{@icon}"] end end WrapIt.register :icon, 'BootstrapIt::ViewHelpers::Icon' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bootstrap_it-0.1.1 | lib/bootstrap_it/view_helpers/icon.rb |
bootstrap_it-0.1.0 | lib/bootstrap_it/view_helpers/icon.rb |