module MongoModel::DocumentExtensions::DynamicFinders

Public Instance Methods

method_missing(method_id, *args, &block) click to toggle source
Calls superclass method
# File lib/mongomodel/document/dynamic_finders.rb, line 12
def method_missing(method_id, *args, &block)
  if finder = DynamicFinder.match(scoped, method_id)
    finder.execute(*args)
  else
    super
  end
end
respond_to?(method_id, include_private = false) click to toggle source
Calls superclass method
# File lib/mongomodel/document/dynamic_finders.rb, line 4
def respond_to?(method_id, include_private = false)
  if DynamicFinder.match(scoped, method_id)
    true
  else
    super
  end
end