module Mongoid::DynamicMatchers::ClassMethods

Public Instance Methods

respond_to?(name, include_private = false) click to toggle source
Calls superclass method
# File lib/mongoid/dynamic_matchers.rb, line 6
def respond_to?(name, include_private = false)
  match = Method.match(self, name)
  match && match.valid? || super
end

Private Instance Methods

method_missing(name, *arguments, &block) click to toggle source
Calls superclass method
# File lib/mongoid/dynamic_matchers.rb, line 13
def method_missing(name, *arguments, &block)
  match = Method.match(self, name)

  if match && match.valid?
    match.define
    send(name, *arguments, &block)
  else
    super
  end
end