module MopedMapping::NodeExt

Public Class Methods

included(klass) click to toggle source
# File lib/moped_mapping/node_ext.rb, line 5
def self.included(klass)
  klass.module_eval do
    alias_method :query_without_mapping, :query
    alias_method :query, :query_with_mapping
    alias_method :get_more_without_mapping, :get_more
    alias_method :get_more, :get_more_with_mapping
  end
end

Public Instance Methods

get_more_with_mapping(database, collection, selector, options = {}, &block) click to toggle source
# File lib/moped_mapping/node_ext.rb, line 19
def get_more_with_mapping(database, collection, selector, options = {}, &block)
  collection = MopedMapping.mapped_name(database, collection)
  return get_more_without_mapping(database, collection, selector, options, &block)
end
query_with_mapping(database, collection, selector, options = {}, &block) click to toggle source
# File lib/moped_mapping/node_ext.rb, line 14
def query_with_mapping(database, collection, selector, options = {}, &block)
  collection = MopedMapping.mapped_name(database, collection)
  return query_without_mapping(database, collection, selector, options, &block)
end