module GlyphHelper

def glyph(*names)

# =>
glyph(:lock, {class: 'foo'})
# =>
glyph(:lock, {tag: :span})
# =>
glyph(:thumbs_up, :pull_left)
# =>
glyph(:lock, :white)
# =>
glyph(:share_alt)
==== Examples
def glyph(*names)
  options = names.last.kind_of?(Hash) ? names.pop : {}
  names.map! { |name| name.to_s.tr('_', '-') }
  names.map! do |name|
    name =~ /pull-(?:left|right)/ ? name : "glyphicon glyphicon-#{name}"
  end
  options[:tag] = options[:tag] ||= :i
  names.push options[:class] || ''
  content_tag options[:tag], nil, class: names
end