Class: HakumiComponents::Slider::Mark
- Inherits:
-
Object
- Object
- HakumiComponents::Slider::Mark
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/slider/mark.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, label:) ⇒ Mark
constructor
A new instance of Mark.
- #numeric_value ⇒ Object
Constructor Details
#initialize(value:, label:) ⇒ Mark
Returns a new instance of Mark.
10 11 12 13 |
# File 'app/components/hakumi_components/slider/mark.rb', line 10 def initialize(value:, label:) @value = value @label = label end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
19 20 21 |
# File 'app/components/hakumi_components/slider/mark.rb', line 19 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
16 17 18 |
# File 'app/components/hakumi_components/slider/mark.rb', line 16 def value @value end |
Instance Method Details
#numeric_value ⇒ Object
22 23 24 |
# File 'app/components/hakumi_components/slider/mark.rb', line 22 def numeric_value @value.to_f end |