Sha256: 6b83564c28b6b6294a7a99e166221b9d6fcfc41be4309909313f6cd013567532

Contents?: true

Size: 475 Bytes

Versions: 11

Compression:

Stored size: 475 Bytes

Contents

module Restspec::Schema::Types
  class NullType < BasicType
    # @param attribute [Restspec::Schema::Attribute] the atribute of the schema.
    #
    # @return nil
    def example_for(attribute)
      nil
    end

    # @param attribute [Restspec::Schema::Attribute] the atribute of the schema.
    # @param value [Object] the value of the attribute.
    #
    # @return [true, false] If the value is nil.
    def valid?(attribute, value)
      value.nil?
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
restspec-0.3.2 lib/restspec/schema/types/null_type.rb
restspec-0.3.1 lib/restspec/schema/types/null_type.rb
restspec-0.3.0 lib/restspec/schema/types/null_type.rb
restspec-0.2.6 lib/restspec/schema/types/null_type.rb
restspec-0.2.5 lib/restspec/schema/types/null_type.rb
restspec-0.2.4 lib/restspec/schema/types/null_type.rb
restspec-0.2.3 lib/restspec/schema/types/null_type.rb
restspec-0.2.2 lib/restspec/schema/types/null_type.rb
restspec-0.2.1 lib/restspec/schema/types/null_type.rb
restspec-0.2 lib/restspec/schema/types/null_type.rb
restspec-0.1 lib/restspec/schema/types/null_type.rb