Class: Avo::Fields::Common::ProgressBarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Avo::Fields::Common::ProgressBarComponent
- Defined in:
- app/components/avo/fields/common/progress_bar_component.rb
Instance Attribute Summary collapse
-
#display_value ⇒ Object
readonly
Returns the value of attribute display_value.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#value_suffix ⇒ Object
readonly
Returns the value of attribute value_suffix.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
-
#initialize(value:, display_value: false, value_suffix: nil, max: 100, view: "index") ⇒ ProgressBarComponent
constructor
A new instance of ProgressBarComponent.
Constructor Details
#initialize(value:, display_value: false, value_suffix: nil, max: 100, view: "index") ⇒ ProgressBarComponent
Returns a new instance of ProgressBarComponent.
10 11 12 13 14 15 16 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 10 def initialize(value:, display_value: false, value_suffix: nil, max: 100, view: "index") @value = value @display_value = display_value @value_suffix = value_suffix @max = max @view = Avo::ViewInquirer.new(view) end |
Instance Attribute Details
#display_value ⇒ Object (readonly)
Returns the value of attribute display_value.
5 6 7 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 5 def display_value @display_value end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
7 8 9 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 7 def max @max end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 4 def value @value end |
#value_suffix ⇒ Object (readonly)
Returns the value of attribute value_suffix.
6 7 8 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 6 def value_suffix @value_suffix end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
8 9 10 |
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 8 def view @view end |