Sha256: 8e478f727971d96b417a2191b2a5c12561ba23e567013988b3d0f9f0b0eeb16a
Contents?: true
Size: 437 Bytes
Versions: 1
Compression:
Stored size: 437 Bytes
Contents
module WildcardMatchers module Helpers def nil_or(expectation = nil, &block) expectation = block_given? ? block : expectation NilOr.new(expectation) end class NilOr < ::WildcardMatchers::WildcardMatcher protected def wildcard_match(actual) unless actual.nil? errors.push(*self.class.superclass.check_errors(actual, expectation, position)) 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/nil_or.rb |