Class: TwitterBootstrapMarkup::Tab

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

Constant Summary

Constants included from Popover

Popover::POSITIONS

Constants included from Tooltip

TwitterBootstrapMarkup::Tooltip::POSITIONS

Instance Attribute Summary collapse

Attributes inherited from Tag

#attributes, #children, #name

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(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

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

Returns the value of attribute nav.



3
4
5
# File 'lib/twitter_bootstrap_markup/tab.rb', line 3

def nav
  @nav
end