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