Class: Avo::Fields::Common::ProgressBarComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/avo/fields/common/progress_bar_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, display_value: false, value_suffix: nil, max: 100) ⇒ ProgressBarComponent

Returns a new instance of ProgressBarComponent.



9
10
11
12
13
14
# File 'app/components/avo/fields/common/progress_bar_component.rb', line 9

def initialize(value:, display_value: false, value_suffix: nil, max: 100)
  @value = value
  @display_value = display_value
  @value_suffix = value_suffix
  @max = max
end

Instance Attribute Details

#display_valueObject (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

#maxObject (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

#valueObject (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_suffixObject (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