Class: TwitterBootstrapMarkup::Button
- Includes:
- ButtonBase
- Defined in:
- lib/twitter_bootstrap_markup/button.rb
Direct Known Subclasses
Constant Summary
Constants included from ButtonBase
TwitterBootstrapMarkup::ButtonBase::SIZES, TwitterBootstrapMarkup::ButtonBase::TYPES
Constants included from Popover
Constants included from Tooltip
Instance Attribute Summary
Attributes inherited from Tag
Instance Method Summary collapse
-
#initialize(*args, &block) ⇒ Button
constructor
A new instance of Button.
Methods included from ButtonBase
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(*args, &block) ⇒ Button
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/twitter_bootstrap_markup/button.rb', line 5 def initialize(*args, &block) text = args.shift unless block_given? attributes = args.shift || {} if block_given? super(:button, attributes.prepend!(:class, 'btn'), &block) else super(:button, text, attributes.prepend!(:class, 'btn')) end end |