[Source]
# File lib/jcon/types.rb, line 42 42: def initialize(types); @types = Types.to_types(types); end
# File lib/jcon/conformance.rb, line 26 26: def contains?(value) 27: return false unless value.is_a?(Array) 28: return false unless value.length >= types.length 29: value.each_with_index do |x, i| 30: return false unless types[[i, types.length-1].min].contains?(x) 31: end 32: true 33: end
# File lib/jcon/types.rb, line 43 43: def to_s; "[#{types.join(', ')}]"; end
[Validate]