Class: HakumiComponents::Slider::Mark

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/components/hakumi_components/slider/mark.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (readonly)

Returns the value of attribute label.



19
20
21
# File 'app/components/hakumi_components/slider/mark.rb', line 19

def label
  @label
end

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



22
23
24
# File 'app/components/hakumi_components/slider/mark.rb', line 22

def numeric_value
  @value.to_f
end