Skip to content

Documentation updates for yard doc errors #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/mongo/auth/cr/conversation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ def start
# Conversation.new(user, "admin")
#
# @param [ Auth::User ] user The user to converse about.
# @param [ String ] database The database to authenticate against.
#
# @since 2.0.0
def initialize(user)
Expand Down
3 changes: 2 additions & 1 deletion lib/mongo/error/invalid_bulk_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class InvalidBulkOperation < Error
# @example Instantiate the exception.
# Mongo::Error::InvalidBulkOperation.new(name)
#
# @param [ String ] name The attempted operation name.
# @param [ String ] type The bulk operation type.
# @param [ Hash ] operation The bulk operation.
#
# @since 2.0.0
def initialize(type, operation)
Expand Down
11 changes: 6 additions & 5 deletions lib/mongo/operation/aggregate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ module Operation
# :db_name => 'test_db'
# })
#
# @param [ Hash ] spec The specifications for the operation.
# Initialization:
# param [ Hash ] spec The specifications for the operation.
#
# @option spec :selector [ Hash ] The aggregate selector.
# @option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# @option spec :options [ Hash ] Options for the aggregate command.
# option spec :selector [ Hash ] The aggregate selector.
# option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# option spec :options [ Hash ] Options for the aggregate command.
#
# @since 2.0.0
class Aggregate
Expand Down
11 changes: 5 additions & 6 deletions lib/mongo/operation/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ module Operation
# @example Create the command operation.
# Mongo::Operation::Command.new({ :selector => { :isMaster => 1 } })
#
# @note A command is actually a query on the virtual '$cmd' collection.
# Initialization:
# param [ Hash ] spec The specifications for the command.
#
# @param [ Hash ] spec The specifications for the command.
#
# @option spec :selector [ Hash ] The command selector.
# @option spec :db_name [ String ] The name of the database on which
# option spec :selector [ Hash ] The command selector.
# option spec :db_name [ String ] The name of the database on which
# the command should be executed.
# @option spec :options [ Hash ] Options for the command.
# option spec :options [ Hash ] Options for the command.
#
# @since 2.0.0
class Command
Expand Down
5 changes: 3 additions & 2 deletions lib/mongo/operation/kill_cursors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ module Operation
# @example Create the kill cursors operation.
# Mongo::Operation::KillCursor.new({ :cursor_ids => [1, 2] })
#
# @param [ Hash ] spec The specifications for the operation.
# Initialization:
# param [ Hash ] spec The specifications for the operation.
#
# @option spec :cursor_ids [ Array ] The ids of cursors to kill.
# option spec :cursor_ids [ Array ] The ids of cursors to kill.
#
# @since 2.0.0
class KillCursors
Expand Down
11 changes: 6 additions & 5 deletions lib/mongo/operation/map_reduce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ module Operation
# :db_name => 'test_db'
# })
#
# @param [ Hash ] spec The specifications for the operation.
# Initialization:
# param [ Hash ] spec The specifications for the operation.
#
# @option spec :selector [ Hash ] The map reduce selector.
# @option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# @option spec :options [ Hash ] Options for the map reduce command.
# option spec :selector [ Hash ] The map reduce selector.
# option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# option spec :options [ Hash ] Options for the map reduce command.
#
# @since 2.0.0
class MapReduce
Expand Down
9 changes: 5 additions & 4 deletions lib/mongo/operation/read/collections_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ module Read
# @example Create the collection names operation.
# Read::CollectionNames.new(:db_name => 'test-db')
#
# @param [ Hash ] spec The specifications for the collection names operation.
# Initialization:
# param [ Hash ] spec The specifications for the collection names operation.
#
# @option spec :db_name [ String ] The name of the database whose collection
# names is requested.
# @option spec :options [ Hash ] Options for the operation.
# option spec :db_name [ String ] The name of the database whose collection
# names is requested.
# option spec :options [ Hash ] Options for the operation.
#
# @since 2.0.0
class CollectionsInfo
Expand Down
15 changes: 8 additions & 7 deletions lib/mongo/operation/read/get_more.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ module Read
# :coll_name => 'test_coll'
# })
#
# @param [ Hash ] spec The specifications for the operation.
# Initialization:
# param [ Hash ] spec The specifications for the operation.
#
# @option spec :to_return [ Integer ] The number of results to return.
# @option spec :cursor_id [ Integer ] The id of the cursor.
# @option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# @option spec :coll_name [ String ] The name of the collection on which
# the operation should be executed.
# option spec :to_return [ Integer ] The number of results to return.
# option spec :cursor_id [ Integer ] The id of the cursor.
# option spec :db_name [ String ] The name of the database on which
# the operation should be executed.
# option spec :coll_name [ String ] The name of the collection on which
# the operation should be executed.
#
# @since 2.0.0
class GetMore
Expand Down
7 changes: 4 additions & 3 deletions lib/mongo/operation/read/indexes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ module Read
# @example Instantiate the operation.
# Read::Indexes.new(:db_name => 'test', :coll_name => 'test_coll')
#
# @param [ Hash ] spec The specifications for the insert.
# Initialization:
# param [ Hash ] spec The specifications for the insert.
#
# @option spec :db_name [ String ] The name of the database.
# @option spec :coll_name [ String ] The name of the collection.
# option spec :db_name [ String ] The name of the database.
# option spec :coll_name [ String ] The name of the collection.
#
# @since 2.0.0
class Indexes
Expand Down
9 changes: 5 additions & 4 deletions lib/mongo/operation/read/list_collections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ module Read
#
# @note A command is actually a query on the virtual '$cmd' collection.
#
# @param [ Hash ] spec The specifications for the command.
# Initialization:
# param [ Hash ] spec The specifications for the command.
#
# @option spec :db_name [ String ] The name of the database whose list of
# collection names is requested.
# @option spec :options [ Hash ] Options for the command.
# option spec :db_name [ String ] The name of the database whose list of
# collection names is requested.
# option spec :options [ Hash ] Options for the command.
#
# @since 2.0.0
class ListCollections
Expand Down
13 changes: 7 additions & 6 deletions lib/mongo/operation/read/list_indexes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ module Read
#
# @note A command is actually a query on the virtual '$cmd' collection.
#
# @param [ Hash ] spec The specifications for the command.
# Initialization:
# param [ Hash ] spec The specifications for the command.
#
# @option spec :coll_name [ Hash ] The name of the collection whose index
# info is requested.
# @option spec :db_name [ String ] The name of the database on which
# the command should be executed.
# @option spec :options [ Hash ] Options for the command.
# option spec :coll_name [ Hash ] The name of the collection whose index
# info is requested.
# option spec :db_name [ String ] The name of the database on which
# the command should be executed.
# option spec :options [ Hash ] Options for the command.
#
# @since 2.0.0
class ListIndexes
Expand Down
15 changes: 8 additions & 7 deletions lib/mongo/operation/read/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ module Read
# :options => { :limit => 2 }
# })
#
# @param [ Hash ] spec The specifications for the query.
# Initialization:
# param [ Hash ] spec The specifications for the query.
#
# @option spec :selector [ Hash ] The query selector.
# @option spec :db_name [ String ] The name of the database on which
# the query should be run.
# @option spec :coll_name [ String ] The name of the collection on which
# the query should be run.
# @option spec :options [ Hash ] Options for the query.
# option spec :selector [ Hash ] The query selector.
# option spec :db_name [ String ] The name of the database on which
# the query should be run.
# option spec :coll_name [ String ] The name of the collection on which
# the query should be run.
# option spec :options [ Hash ] Options for the query.
#
# @since 2.0.0
class Query
Expand Down
25 changes: 13 additions & 12 deletions lib/mongo/operation/write/bulk/bulk_delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ module Write
# :write_concern => write_concern
# })
#
# @param [ Hash ] spec The specifications for the delete.
# Initialization:
# param [ Hash ] spec The specifications for the delete.
#
# @option spec :deletes [ Array ] The delete documents.
# @option spec :db_name [ String ] The name of the database on which
# the delete should be executed.
# @option spec :coll_name [ String ] The name of the collection on which
# the delete should be executed.
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern
# for this operation.
# @option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# @option spec :options [Hash] Options for the command, if it ends up being a
# write command.
# option spec :deletes [ Array ] The delete documents.
# option spec :db_name [ String ] The name of the database on which
# the delete should be executed.
# option spec :coll_name [ String ] The name of the collection on which
# the delete should be executed.
# option spec :write_concern [ Mongo::WriteConcern ] The write concern
# for this operation.
# option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# option spec :options [Hash] Options for the command, if it ends up being a
# write command.
#
# @since 2.0.0
class BulkDelete
Expand Down
19 changes: 10 additions & 9 deletions lib/mongo/operation/write/bulk/bulk_insert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ module Write
# :ordered => false
# })
#
# @param [ Hash ] spec The specifications for the insert.
# Initialization:
# param [ Hash ] spec The specifications for the insert.
#
# @option spec :documents [ Array ] The documents to insert.
# @option spec :db_name [ String ] The name of the database.
# @option spec :coll_name [ String ] The name of the collection.
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern.
# @option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# @option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
# option spec :documents [ Array ] The documents to insert.
# option spec :db_name [ String ] The name of the database.
# option spec :coll_name [ String ] The name of the collection.
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
# option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
#
# @since 2.0.0
class BulkInsert
Expand Down
4 changes: 2 additions & 2 deletions lib/mongo/operation/write/bulk/bulk_insert/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Result < Operation::Result
# Result.new(replies, inserted_ids)
#
# @param [ Protocol::Reply ] replies The wire protocol replies.
# @params [ Array<Object> ] ids The ids of the inserted documents.
# @param [ Array<Object> ] ids The ids of the inserted documents.
#
# @since 2.0.0
def initialize(replies, ids)
Expand Down Expand Up @@ -88,7 +88,7 @@ class LegacyResult < Operation::Result
# Result.new(replies, inserted_ids)
#
# @param [ Protocol::Reply ] replies The wire protocol replies.
# @params [ Array<Object> ] ids The ids of the inserted documents.
# @param [ Array<Object> ] ids The ids of the inserted documents.
#
# @since 2.0.0
def initialize(replies, ids)
Expand Down
23 changes: 12 additions & 11 deletions lib/mongo/operation/write/bulk/bulk_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ module Write
# :ordered => false
# })
#
# @param [ Hash ] spec The specifications for the update.
# Initialization:
# param [ Hash ] spec The specifications for the update.
#
# @option spec :updates [ Array ] The update documents.
# @option spec :db_name [ String ] The name of the database on which
# the query should be run.
# @option spec :coll_name [ String ] The name of the collection on which
# the query should be run.
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern.
# @option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# @option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
# option spec :updates [ Array ] The update documents.
# option spec :db_name [ String ] The name of the database on which
# the query should be run.
# option spec :coll_name [ String ] The name of the collection on which
# the query should be run.
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
# option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
#
# @since 2.0.0
class BulkUpdate
Expand Down
15 changes: 8 additions & 7 deletions lib/mongo/operation/write/create_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ module Write
# :index_name => 'name_1_age_-1'
# })
#
# @param [ Hash ] spec The specifications for the insert.
# Initialization:
# param [ Hash ] spec The specifications for the insert.
#
# @option spec :index [ Hash ] The index spec to create.
# @option spec :db_name [ String ] The name of the database.
# @option spec :coll_name [ String ] The name of the collection.
# @option spec :index_name [ String ] The name of the index.
# @option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
# option spec :index [ Hash ] The index spec to create.
# option spec :db_name [ String ] The name of the database.
# option spec :coll_name [ String ] The name of the collection.
# option spec :index_name [ String ] The name of the index.
# option spec :options [ Hash ] Options for the command, if it ends up being a
# write command.
#
# @since 2.0.0
class CreateIndex
Expand Down
7 changes: 4 additions & 3 deletions lib/mongo/operation/write/create_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ module Write
# @example Initialize the operation.
# Write::CreateUser.new(:db_name => 'test', :user => user)
#
# @param [ Hash ] spec The specifications for the create.
# Initialization:
# param [ Hash ] spec The specifications for the create.
#
# @option spec :user [ Auth::User ] The user to create.
# @option spec :db_name [ String ] The name of the database.
# option spec :user [ Auth::User ] The user to create.
# option spec :db_name [ String ] The name of the database.
#
# @since 2.0.0
class CreateUser
Expand Down
25 changes: 13 additions & 12 deletions lib/mongo/operation/write/delete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ module Write
# :write_concern => write_concern
# })
#
# @param [ Hash ] spec The specifications for the delete.
# Initialization:
# param [ Hash ] spec The specifications for the delete.
#
# @option spec :delete [ Hash ] The delete document.
# @option spec :db_name [ String ] The name of the database on which
# the delete should be executed.
# @option spec :coll_name [ String ] The name of the collection on which
# the delete should be executed.
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern
# for this operation.
# @option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# @option spec :options [Hash] Options for the command, if it ends up being a
# write command.
# option spec :delete [ Hash ] The delete document.
# option spec :db_name [ String ] The name of the database on which
# the delete should be executed.
# option spec :coll_name [ String ] The name of the collection on which
# the delete should be executed.
# option spec :write_concern [ Mongo::WriteConcern ] The write concern
# for this operation.
# option spec :ordered [ true, false ] Whether the operations should be
# executed in order.
# option spec :options [Hash] Options for the command, if it ends up being a
# write command.
#
# @since 2.0.0
class Delete
Expand Down
Loading