Class: Jav::Fields::Common::ProgressBarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Jav::Fields::Common::ProgressBarComponent
- Defined in:
- app/components/jav/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
- #index? ⇒ Boolean
-
#initialize(value:, display_value: false, value_suffix: nil, max: 100, view: :index) ⇒ ProgressBarComponent
constructor
A new instance of ProgressBarComponent.
- #show? ⇒ Boolean
Constructor Details
#initialize(value:, display_value: false, value_suffix: nil, max: 100, view: :index) ⇒ ProgressBarComponent
Returns a new instance of ProgressBarComponent.
6 7 8 9 10 11 12 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 6 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 = view end |
Instance Attribute Details
#display_value ⇒ Object (readonly)
Returns the value of attribute display_value.
4 5 6 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 4 def display_value @display_value end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
4 5 6 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 4 def max @max end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 4 def value @value end |
#value_suffix ⇒ Object (readonly)
Returns the value of attribute value_suffix.
4 5 6 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 4 def value_suffix @value_suffix end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
4 5 6 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 4 def view @view end |
Instance Method Details
#index? ⇒ Boolean
18 19 20 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 18 def index? view == :index end |
#show? ⇒ Boolean
14 15 16 |
# File 'app/components/jav/fields/common/progress_bar_component.rb', line 14 def show? view == :show end |