Sha256: 7543c148e889e8bed012859a361fd6cea44c270d21980ecffbd63e128ff5d597

Contents?: true

Size: 217 Bytes

Versions: 4

Compression:

Stored size: 217 Bytes

Contents

module Restspec::Schema::Types
  class BooleanType < BasicType
    def example_for(attribute)
      [true, false].sample
    end

    def valid?(attribute, value)
      [true, false].include?(value)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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