Class: Pajamas::ProgressComponent
- Defined in:
- app/components/pajamas/progress_component.rb
Constant Summary collapse
- VARIANT_OPTIONS =
[:primary, :success].freeze
Instance Method Summary collapse
-
#initialize(value: 0, variant: :primary) ⇒ ProgressComponent
constructor
A new instance of ProgressComponent.
Constructor Details
#initialize(value: 0, variant: :primary) ⇒ ProgressComponent
Returns a new instance of ProgressComponent.
5 6 7 8 |
# File 'app/components/pajamas/progress_component.rb', line 5 def initialize(value: 0, variant: :primary) @value = value @variant = filter_attribute(variant, VARIANT_OPTIONS, default: :primary) end |