Top Level Namespace

Defined Under Namespace

Classes: CustomMatcher, RackBox, String

Instance Method Summary collapse

Instance Method Details

#matcher(name, context = self.class, &block) ⇒ Object



49
50
51
52
# File 'lib/rspec/custom_matcher.rb', line 49

def matcher(name, context = self.class, &block)
  klass = CustomMatcher.create(name, &block)
  context.send(:define_method, name) { |*args| klass.new(*args) }
end