Module: Shoehorn::Helpers::ProgressBarHelpers

Defined in:
lib/shoehorn/helpers/progress_bar_helpers.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_progress_bar(width, options = {}) ⇒ Object

Render a bootstrap progress bar

Examples

bootstrap_progress_bar(40, type: 'success', striped: true, animated: true)

Parameters:

  • width (Integer)

    percent out of 100 progress on bar

  • options (Hash) (defaults to: {})

    hash containing options (default: {}): :type - Additional progress type(s). For one, just specify a string, but

    you can also pass an array (of sym or str) for multiple classes
    

    :striped [Boolean] - Additional progress type(s). For one, just specify a string, but

    you can also pass an array (of sym or str) for multiple classes
    

    :html_options - Any additional options you’d like to pass to the content_tag that will be created

    for this button's a tag (for instance :target can be specified in :html_options).
    


18
19
20
21
22
23
# File 'lib/shoehorn/helpers/progress_bar_helpers.rb', line 18

def bootstrap_progress_bar(width, options = {})
  Shoehorn::Components::ProgressBar.new(
    width,
    options
  ).to_s
end