Sha256: 8a5748b68b7cd4b66be1ac1c3a60bcf0a14e8867baac966be6b34ecfadfb3903

Contents?: true

Size: 285 Bytes

Versions: 1

Compression:

Stored size: 285 Bytes

Contents

module Formulario
  class Field
    class Float < Field
      private

      def self.build(raw_value)
        new Float(raw_value)
      rescue ArgumentError, TypeError => e
        ExceptionalValue.new(raw_value, reasons: ['needs to represent a float'])
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
formulario-0.1.12 lib/formulario/fields/float.rb