class Hashape::Specifiers::OneOf
Given a list of type specs, allows the value to match any one of those type specs.
Public Instance Methods
===(v)
click to toggle source
# File lib/hashape.rb, line 46 def ===(v) raise 'spec for OneOf must be an array' unless self.spec.is_a?(Array) self.spec.any? { |s| s === v } end