Class: Unit::Types::Float

Inherits:
Object
  • Object
show all
Defined in:
lib/unit-ruby/types/float.rb

Class Method Summary collapse

Class Method Details

.cast(value) ⇒ Object



4
5
6
# File 'lib/unit-ruby/types/float.rb', line 4

def self.cast(value)
  value&.to_f
end