Class: Mountapi::Schema::Number
- Inherits:
-
Object
- Object
- Mountapi::Schema::Number
- Includes:
- Base
- Defined in:
- lib/mountapi/schema/number.rb
Overview
Schema implementation for Number type
Instance Method Summary collapse
-
#cast(value) ⇒ Object
cast value to float.
Methods included from Base
Instance Method Details
#cast(value) ⇒ Object
cast value to float
10 11 12 13 14 |
# File 'lib/mountapi/schema/number.rb', line 10 def cast(value) Float(value) rescue ArgumentError raise_cast_error(value) end |