Class: TwitterBootstrapMarkup::Pagination

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

Constant Summary

Constants included from Popover

TwitterBootstrapMarkup::Popover::POSITIONS

Constants included from Tooltip

Tooltip::POSITIONS

Instance Attribute Summary

Attributes inherited from Tag

#attributes, #children, #name

Class Method Summary collapse

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) ⇒ Pagination

Returns a new instance of Pagination.



4
5
6
7
8
# File 'lib/twitter_bootstrap_markup/pagination.rb', line 4

def initialize(attributes={}, &block)
  super(:div, attributes.prepend!(:class, 'pagination')) do
    append UlContainer.new(&block)
  end
end

Class Method Details

.centered(*args, &block) ⇒ Object



20
21
22
# File 'lib/twitter_bootstrap_markup/pagination.rb', line 20

def self.centered(*args, &block)
  self.new(*args, &block).centered
end

.right(*args, &block) ⇒ Object



24
25
26
# File 'lib/twitter_bootstrap_markup/pagination.rb', line 24

def self.right(*args, &block)
  self.new(*args, &block).right
end

Instance Method Details

#centeredObject



10
11
12
13
# File 'lib/twitter_bootstrap_markup/pagination.rb', line 10

def centered
  attributes.append!(:class, 'pagination-centered')
  self
end

#rightObject



15
16
17
18
# File 'lib/twitter_bootstrap_markup/pagination.rb', line 15

def right
  attributes.append!(:class, 'pagination-right')
  self
end