Module: MopedMapping::NodeExt
- Defined in:
- lib/moped_mapping/node_ext.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_more_with_mapping(database, collection, selector, options = {}, &block) ⇒ Object
- #query_with_mapping(database, collection, selector, options = {}, &block) ⇒ Object
Class Method Details
.included(klass) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/moped_mapping/node_ext.rb', line 6 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 |
Instance Method Details
#get_more_with_mapping(database, collection, selector, options = {}, &block) ⇒ Object
20 21 22 23 |
# File 'lib/moped_mapping/node_ext.rb', line 20 def get_more_with_mapping(database, collection, selector, = {}, &block) collection = MopedMapping.mapped_name(database, collection) return get_more_without_mapping(database, collection, selector, , &block) end |
#query_with_mapping(database, collection, selector, options = {}, &block) ⇒ Object
15 16 17 18 |
# File 'lib/moped_mapping/node_ext.rb', line 15 def query_with_mapping(database, collection, selector, = {}, &block) collection = MopedMapping.mapped_name(database, collection) return query_without_mapping(database, collection, selector, , &block) end |