Class: Matestack::Ui::Bootstrap::Components::Progress

Inherits:
Component
  • Object
show all
Defined in:
app/concepts/matestack/ui/bootstrap/components/progress.rb

Instance Method Summary collapse

Instance Method Details

#responseObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/concepts/matestack/ui/bootstrap/components/progress.rb', line 11

def response
  div progress_attributes do
    progress = self.progress.is_a?(Array) ? self.progress : [{ value: self.progress || value, text: self.text }]
    progress.each do |prog|
      progress_bar(prog[:value], valuemin, valuemax,
        text: prog[:text], klass: prog[:class], variant: prog[:variant] || variant,
        striped: prog[:striped] || striped, animated: prog[:animated] || animated,
        aria_valuenow: prog[:aria_valuenow]
      )
    end
    yield_components
  end
end