class Formulario::Field::Float

Private Class Methods

build(raw_value) click to toggle source
# File lib/formulario/fields/float.rb, line 6
def self.build(raw_value)
  new Float(raw_value)
rescue ArgumentError, TypeError => e
  ExceptionalValue.new(raw_value, reasons: ['needs to represent a float'])
end