Class: Bulma::ProgressBarComponent
- Defined in:
- app/components/bulma/progress_bar_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(value = nil, max: nil, color: nil, size: nil, **options) ⇒ ProgressBarComponent
constructor
A new instance of ProgressBarComponent.
Constructor Details
#initialize(value = nil, max: nil, color: nil, size: nil, **options) ⇒ ProgressBarComponent
Returns a new instance of ProgressBarComponent.
5 6 7 8 9 10 11 |
# File 'app/components/bulma/progress_bar_component.rb', line 5 def initialize(value = nil, max: nil, color: nil, size: nil, **) @value = value @max = max @color = color @size = size = end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/components/bulma/progress_bar_component.rb', line 13 def call content_tag( :progress, content, class: class_names( "progress", "is-#{@color}" => @color.present?, "is-#{@size}" => @size.present? ), value: @value, max: @max, ** ) end |