Sha256: 0b210c363b984e26bd03db78cfb687963b2ca631651774afff91e258168689f1
Contents?: true
Size: 496 Bytes
Versions: 2
Compression:
Stored size: 496 Bytes
Contents
module WildcardMatchers module Helpers define_wildcard_helper(:any_of) class AnyOf < ::WildcardMatchers::WildcardMatcher def |(matcher) expectation.push(matcher) self end protected def wildcard_match(actual) errors = expectation.map do |e| self.class.superclass.check_errors(actual, e, position) end unless errors.any? {|e| e == [] } @errors = errors.flatten end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wildcard_matchers-0.9.2 | lib/wildcard_matchers/helpers/any_of.rb |
wildcard_matchers-0.9.1 | lib/wildcard_matchers/helpers/any_of.rb |