lib/plucky.rb in plucky-0.4.4 vs lib/plucky.rb in plucky-0.5.0

- old
+ new

@@ -8,19 +8,11 @@ require 'plucky/pagination' module Plucky autoload :Version, 'plucky/version' - # Array of methods that actually perform queries - Methods = [ - :where, :filter, :limit, :skip, :offset, :sort, :order, - :fields, :ignore, :only, - :each, :find_each, - :count, :size, :distinct, - :last, :first, :all, :paginate, - :exists?, :exist?, :empty?, - :to_a, :remove, - ] + # Array of finder DSL methods to delegate + Methods = Plucky::Query::DSL.instance_methods.sort.map(&:to_sym) def self.to_object_id(value) return value if value.is_a?(BSON::ObjectId) return nil if value.nil? || (value.respond_to?(:empty?) && value.empty?)