Sha256: 0b40baa7841e778d8339d1b230b05e5bad1a6994ed3473a9b142f8176bfc76f6

Contents?: true

Size: 525 Bytes

Versions: 17

Compression:

Stored size: 525 Bytes

Contents

module WildcardMatchers
  autoload :Helpers,  "wildcard_matchers/helpers"
  autoload :Matchers, "wildcard_matchers/matchers"
  autoload :WildcardMatcher, "wildcard_matchers/wildcard_matcher"

  include Helpers
  include Matchers

  def wildcard_match?(actual, expected, &on_failure)
    errors = WildcardMatcher.check_errors(actual, expected)

    if errors.empty? #matcher.errors.empty?
      true
    else
      on_failure.call(errors) if block_given?
      false
    end
  end
  module_function *self.instance_methods
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
wildcard_matchers-0.9.2 lib/wildcard_matchers.rb
wildcard_matchers-0.9.1 lib/wildcard_matchers.rb
wildcard_matchers-0.9.0 lib/wildcard_matchers.rb
wildcard_matchers-0.4.0 lib/wildcard_matchers.rb
wildcard_matchers-0.3.1 lib/wildcard_matchers.rb
wildcard_matchers-0.3.0 lib/wildcard_matchers.rb
wildcard_matchers-0.2.1 lib/wildcard_matchers.rb
wildcard_matchers-0.2.0 lib/wildcard_matchers.rb
wildcard_matchers-0.1.8 lib/wildcard_matchers.rb
wildcard_matchers-0.1.7 lib/wildcard_matchers.rb
wildcard_matchers-0.1.6 lib/wildcard_matchers.rb
wildcard_matchers-0.1.5 lib/wildcard_matchers.rb
wildcard_matchers-0.1.4 lib/wildcard_matchers.rb
wildcard_matchers-0.1.3 lib/wildcard_matchers.rb
wildcard_matchers-0.1.2 lib/wildcard_matchers.rb
wildcard_matchers-0.1.1 lib/wildcard_matchers.rb
wildcard_matchers-0.1.0 lib/wildcard_matchers.rb