Class: TwitterBootstrapMarkup::Tab
- Defined in:
- lib/twitter_bootstrap_markup/tab.rb
Constant Summary
Constants included from Popover
Constants included from Tooltip
TwitterBootstrapMarkup::Tooltip::POSITIONS
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#nav ⇒ Object
readonly
Returns the value of attribute nav.
Attributes inherited from Tag
Instance Method Summary collapse
-
#initialize(attributes = {}, &block) ⇒ Tab
constructor
A new instance of Tab.
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(attributes = {}, &block) ⇒ Tab
Returns a new instance of Tab.
6 7 8 9 10 11 |
# File 'lib/twitter_bootstrap_markup/tab.rb', line 6 def initialize(attributes={}, &block) super(:div, attributes.prepend!(:class, 'tab')) {} @nav = append NavTabContainer.new @content = append TabContent.new instance_eval &block if block_given? end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/twitter_bootstrap_markup/tab.rb', line 4 def content @content end |
#nav ⇒ Object (readonly)
Returns the value of attribute nav.
3 4 5 |
# File 'lib/twitter_bootstrap_markup/tab.rb', line 3 def nav @nav end |