Class: OBIX::Types::Float

Inherits:
Type
  • Object
show all
Defined in:
lib/obix/types/float.rb

Instance Method Summary collapse

Methods inherited from Type

#initialize

Constructor Details

This class inherits a constructor from OBIX::Types::Type

Instance Method Details

#cast(value) ⇒ Object

Cast the given value to a float.

value - Any object that responds to ‘to_f`.

Returns a float.



11
12
13
# File 'lib/obix/types/float.rb', line 11

def cast value
  value.to_f
end