Sha256: 4050b76d6f781d3773534530b3b0f1147ef40a39042f4b61c6a59e70dfc3f92f

Contents?: true

Size: 292 Bytes

Versions: 8

Compression:

Stored size: 292 Bytes

Contents

module Formulario
  class Field
    class Integer < Field
      private

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

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
formulario-0.1.12 lib/formulario/fields/integer.rb
formulario-0.1.11 lib/formulario/fields/integer.rb
formulario-0.1.10 lib/formulario/fields/integer.rb
formulario-0.1.9 lib/formulario/fields/integer.rb
formulario-0.1.8 lib/formulario/fields/integer.rb
formulario-0.1.6 lib/formulario/fields/integer.rb
formulario-0.1.5 lib/formulario/fields/integer.rb
formulario-0.1.4 lib/formulario/fields/integer.rb