Sha256: 9de0209f9c4126e5d11bb454d6623e7b86552ac8dba134c14e60678ec68ee834

Contents?: true

Size: 206 Bytes

Versions: 4

Compression:

Stored size: 206 Bytes

Contents

module Restspec::Schema::Types
  class IntegerType < BasicType
    def example_for(attribute)
      Faker::Number.digit
    end

    def valid?(attribute, value)
      value.is_a?(Fixnum)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
restspec-0.0.4 lib/restspec/schema/types/integer_type.rb
restspec-0.0.3 lib/restspec/schema/types/integer_type.rb
restspec-0.0.2 lib/restspec/schema/types/integer_type.rb
restspec-0.0.1 lib/restspec/schema/types/integer_type.rb