Class: TwitterBootstrapMarkup::ProgressBar
- Defined in:
- lib/twitter_bootstrap_markup/progress_bar.rb
Constant Summary collapse
- TYPES =
[:info, :success, :danger, :warning]
Constants included from Popover
TwitterBootstrapMarkup::Popover::POSITIONS
Constants included from Tooltip
Instance Attribute Summary
Attributes inherited from Tag
Instance Method Summary collapse
-
#initialize(percentage = 0) ⇒ ProgressBar
constructor
A new instance of ProgressBar.
- #striped ⇒ Object
- #striped_animated ⇒ Object
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(percentage = 0) ⇒ ProgressBar
Returns a new instance of ProgressBar.
5 6 7 8 9 |
# File 'lib/twitter_bootstrap_markup/progress_bar.rb', line 5 def initialize(percentage=0) super(:div, :class => 'progress') do append Tag.block(:div, :class => 'bar', :style => "width: #{percentage}%;") end end |
Instance Method Details
#striped ⇒ Object
11 12 13 14 |
# File 'lib/twitter_bootstrap_markup/progress_bar.rb', line 11 def striped attributes.append! :class, "progress-striped" self end |
#striped_animated ⇒ Object
16 17 18 19 |
# File 'lib/twitter_bootstrap_markup/progress_bar.rb', line 16 def striped_animated attributes.append! :class, "progress-striped active" self end |