Class: TwitterBootstrapMarkup::Icon
- Defined in:
- lib/twitter_bootstrap_markup/icon.rb
Constant Summary
Constants included from Popover
Constants included from Tooltip
Instance Attribute Summary
Attributes inherited from Tag
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, attributes = {}) ⇒ Icon
constructor
A new instance of Icon.
- #white ⇒ Object
Methods inherited from Tag
#append, block, inline, #prepend, #to_s
Methods included from SidePosition
Methods included from Popover
Methods included from 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
#white ⇒ Object
8 9 10 11 |
# File 'lib/twitter_bootstrap_markup/icon.rb', line 8 def white attributes.append!(:class, 'icon-white') self end |