lib/wildcard_matchers/helpers.rb in wildcard_matchers-0.0.4 vs lib/wildcard_matchers/helpers.rb in wildcard_matchers-0.1.0

- old
+ new

@@ -1,20 +1,7 @@ -module WildcardMatchers +module WildcardMathcers module Helpers - def nil_or(expected, &on_failure) - lambda do |actual| - nil === actual or wildcard_match?(actual, expected, &on_failure) - end - end - - def for_all(expected = nil, &on_failure) - raise "expected or block is mandatory" unless expected or block_given? - - expected ||= block - lambda do |actual| - actual.all? do |item| - wildcard_match?(item, expected, &on_failure) - end - end - end end end + +require "wildcard_matchers/helpers/for_all" +require "wildcard_matchers/helpers/nil_or"