Sha256: 2351ee93f038651f81917108f837cd6334acef1f3a48307bb0049434a0715b99

Contents?: true

Size: 616 Bytes

Versions: 4

Compression:

Stored size: 616 Bytes

Contents

module WildcardMatchers
  module Helpers
    class << self
      def define_wildcard_helper(name)
        define_method(name) do |expectation = nil, &block|
          expectation = block_given? ? block : expectation

          ::WildcardMatchers::Helpers.const_get(name.to_s.camelcase(:upper)).new(expectation)
        end
      end
    end
  end
end

require "wildcard_matchers/helpers/any_of"
require "wildcard_matchers/helpers/all_of"
require "wildcard_matchers/helpers/for_any"
require "wildcard_matchers/helpers/for_all"
require "wildcard_matchers/helpers/nil_or"
require "wildcard_matchers/helpers/responding"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wildcard_matchers-0.9.2 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.9.1 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.9.0 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.4.0 lib/wildcard_matchers/helpers.rb