Sha256: ef56f6564633299b7474a96fdd14c399f9a2c22f41f044019d5a895bf7ea945f

Contents?: true

Size: 309 Bytes

Versions: 1

Compression:

Stored size: 309 Bytes

Contents

require "mountapi/schema/base"

module Mountapi
  module Schema
    # Schema implementation for Integer type
    class Integer
      include Base

      # cast value to integer
      def cast(value)
        Integer(value)
      rescue ArgumentError
        raise_cast_error(value)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mountapi-0.11.1 lib/mountapi/schema/integer.rb