module BootstrapProgressbar::Helper

Public Instance Methods

progress_bar(percent, options = {}) click to toggle source

generate progress and progress-bar inside

# File lib/bootstrap_progressbar/helper.rb, line 62
def progress_bar(percent, options = {})
  Private.check_percent(percent)

  clazz = [options.delete(:class), 'progress'].join(' ').strip()
  id = " id='#{options.delete(:id)}' " if options[:id]
  style = " style='#{options.delete(:style)}' " if options[:style]

  progress_bar = Private.only_progress_bar(percent, options)

  raw "<div class='#{clazz}'#{id}#{style}>#{progress_bar}</div>"
end
simple_progress_bar(percent, options = {}) click to toggle source

only generate the progress-bar

# File lib/bootstrap_progressbar/helper.rb, line 75
def simple_progress_bar(percent, options = {})
  Private.check_percent(percent)
  raw Private.only_progress_bar(percent, options)
end