Sha256: 57d658ad7107d4356e6348ad02702c4d46fa41ea31808fc445fc5a82c26b0238
Contents?: true
Size: 460 Bytes
Versions: 1
Compression:
Stored size: 460 Bytes
Contents
module WildcardMatchers module Helpers def for_all(expectation = nil, &block) expectation = block_given? ? block : expectation ForAll.new(expectation) end class ForAll < ::WildcardMatchers::WildcardMatcher protected def wildcard_match(actual) actual.each.with_index do |e, i| errors.push(*self.class.superclass.check_errors(e, expectation, position + "[#{i}]")) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wildcard_matchers-0.1.1 | lib/wildcard_matchers/helpers/for_all.rb |