Module: BootstrapProgressbar::Helper
- Includes:
- Private
- Defined in:
- lib/bootstrap_progressbar/helper.rb
Defined Under Namespace
Modules: Private
Instance Method Summary collapse
-
#progress_bar(percent, options = {}) ⇒ Object
generate progress and progress-bar inside.
-
#simple_progress_bar(percent, options = {}) ⇒ Object
only generate the progress-bar.
Methods included from Private
check_percent, only_progress_bar
Instance Method Details
#progress_bar(percent, options = {}) ⇒ Object
generate progress and progress-bar inside
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/bootstrap_progressbar/helper.rb', line 62 def (percent, = {}) Private.check_percent(percent) clazz = [.delete(:class), 'progress'].join(' ').strip() id = " id='#{.delete(:id)}' " if [:id] style = " style='#{.delete(:style)}' " if [:style] = Private.(percent, ) raw "<div class='#{clazz}'#{id}#{style}>#{}</div>" end |
#simple_progress_bar(percent, options = {}) ⇒ Object
only generate the progress-bar
75 76 77 78 |
# File 'lib/bootstrap_progressbar/helper.rb', line 75 def (percent, = {}) Private.check_percent(percent) raw Private.(percent, ) end |