Sha256: 5cadd0d5f4e08ada9daad82a715f5e08a846a82d36d8beb8757b886368310a06

Contents?: true

Size: 876 Bytes

Versions: 4

Compression:

Stored size: 876 Bytes

Contents

# encoding: utf-8
module Mongoid #:nodoc:
  module Collections #:nodoc:
    module Operations #:nodoc:
      # Constant definining all the read operations available for a
      # Mongo:Collection. This is used in delegation.
      READ = [
        :[],
        :count,
        :distinct,
        :find,
        :find_one,
        :group,
        :index_information,
        :map_reduce,
        :mapreduce,
        :options
      ]

      # Constant definining all the write operations available for a
      # Mongo:Collection. This is used in delegation.
      WRITE = [
        :<<,
        :create_index,
        :drop,
        :drop_index,
        :drop_indexes,
        :insert,
        :remove,
        :rename,
        :save,
        :update
      ]

      # Convenience constant for getting back all collection operations.
      ALL = (READ + WRITE)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-1.2.3 lib/mongoid/collections/operations.rb
mongoid-1.2.2 lib/mongoid/collections/operations.rb
mongoid-1.2.1 lib/mongoid/collections/operations.rb
mongoid-1.2.0 lib/mongoid/collections/operations.rb