Sha256: a014364c062f7c0df81d3bada5d6f7af0b4c777fd3f2505482e0c339bf2692b8
Contents?: true
Size: 328 Bytes
Versions: 4
Compression:
Stored size: 328 Bytes
Contents
module Restspec::Schema::Types class OneOfType < BasicType def example_for(attribute) elements.sample end def valid?(attribute, value) elements.include?(value) end def to_s "OneOfType(#{elements})" end private def elements options.fetch(:elements) end end end
Version data entries
4 entries across 4 versions & 1 rubygems