Class: TwitterBootstrapMarkup::Icon

Inherits:
Tag
  • Object
show all
Defined in:
lib/twitter_bootstrap_markup/icon.rb

Constant Summary

Constants included from Popover

Popover::POSITIONS

Constants included from Tooltip

Tooltip::POSITIONS

Instance Attribute Summary

Attributes inherited from Tag

#attributes, #children, #name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Tag

#append, block, inline, #prepend, #to_s

Methods included from SidePosition

#pull_left, #pull_right

Methods included from Popover

#popover

Methods included from Tooltip

#tooltip

Constructor Details

#initialize(name, attributes = {}) ⇒ Icon

Returns a new instance of Icon.



4
5
6
# File 'lib/twitter_bootstrap_markup/icon.rb', line 4

def initialize(name, attributes={})
  super(:i, attributes.prepend!(:class, "icon-#{name}")) {}
end

Class Method Details

.white(*args) ⇒ Object



13
14
15
# File 'lib/twitter_bootstrap_markup/icon.rb', line 13

def self.white(*args)
  self.new(*args).white
end

Instance Method Details

#whiteObject



8
9
10
11
# File 'lib/twitter_bootstrap_markup/icon.rb', line 8

def white
  attributes.append!(:class, 'icon-white')
  self
end