Sha256: 6e7fa7396113c3e745395d6416543fa11b489ced24e6c9a2122329943856ba37

Contents?: true

Size: 483 Bytes

Versions: 4

Compression:

Stored size: 483 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/for_all"
require "wildcard_matchers/helpers/nil_or"
require "wildcard_matchers/helpers/for_any"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wildcard_matchers-0.1.5 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.1.4 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.1.3 lib/wildcard_matchers/helpers.rb
wildcard_matchers-0.1.2 lib/wildcard_matchers/helpers.rb