Class: CommandModel::Convert::Float
- Inherits:
-
Object
- Object
- CommandModel::Convert::Float
- Defined in:
- lib/command_model/convert.rb
Instance Method Summary collapse
Instance Method Details
#call(value) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/command_model/convert.rb', line 51 def call(value) return nil if value.blank? Float(value) rescue StandardError => e raise ConvertError.new(e, "number") end |