def progress(type: '',
                 percentage: 0,
                 content: '',
                 bar_options: {},
                 active: false,
                 striped: false,
                 in_table: false,
                 **options,
                 &block)

      progress_class = "progress"
      progress_class << " progress-striped" if striped
      progress_class << " active" if active

      options[:style] ||= ""
      options[:style] << "margin-bottom: 0;" if in_table

      div(merge_predef_class(progress_class, options)) do
        content = ''
        if block_given?
          content << capture(&block)
        else
          content << progress_bar(bar_options.reverse_merge!(type: type,
            percentage: percentage, content: content))
        end
        content.html_safe
      end
    end
def progress(type: '',
                 percentage: 0,
                 content: '',
                 bar_options: {},
                 active: false,
                 striped: false,
                 in_table: false,
                 **options,
                 &block)

      progress_class = "progress"
      progress_class << " progress-striped" if striped
      progress_class << " active" if active

      options[:style] ||= ""
      options[:style] << "margin-bottom: 0;" if in_table

      div(merge_predef_class(progress_class, options)) do
        content = ''
        if block_given?
          content << capture(&block)
        else
          content << progress_bar(bar_options.reverse_merge!(type: type,
            percentage: percentage, content: content))
        end
        content.html_safe
      end
    end
Public: Bootstrap progress bars.

 type        - String. Type of progress bar. It can be success, warning,
               danger, info. ( default: '' )
 percentage  - Integer. Progress of the progress bar. 0 - 100.
               ( default: 0 )
 conent      - String. Text of the progress bar. It will be shown in the
               center of the bar. ( default: '' )
 bar_options - Other options can be accepted by div.
 striped     - Boolean. Uses a gradient to create a striped effect. Not
               available in IE7-8. ( default: false )
 active      - Boolean. Add .active to .progress-striped to animate the
               stripes right to left. Not available in all versions of IE.
               ( default: false )
 in_table    - Boolean. If progress is in a table, set the margin-bottom
               to zero. ( default: false )
 options     - Other options that can be acctpted by div.
 block       - The content of the progress. If a block has been passed,
               the arguments of type, percentage, content, bar_options
               would be ignored. The block should contain one or more
               progress bars.

 Examples

   pg(type: 'success', percentage: 25, striped: true)
   # => <div class="progress progress-striped">
          <div class="bar bar-success" style="width: 25%">
          </div>
        </div>

   = pg do
     = pb(type: 'success', percentage: 25)
     = pb(type: 'info', percentage: 25)
   # => <div class="progress">
          <div class="bar bar-success" style="width: 25%">
          </div>
          <div class="bar bar-info" style="width: 25%">
          </div>
        </div>

 Return the whole progress component.