Skip to content

Commit 9b134b1

Browse files
committed
Merge pull request #636 from estolfo/yardoc
Documentation updates for yard doc errors
2 parents 7155368 + 24ff791 commit 9b134b1

25 files changed

+154
-135
lines changed

lib/mongo/auth/cr/conversation.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def start
102102
# Conversation.new(user, "admin")
103103
#
104104
# @param [ Auth::User ] user The user to converse about.
105-
# @param [ String ] database The database to authenticate against.
106105
#
107106
# @since 2.0.0
108107
def initialize(user)

lib/mongo/error/invalid_bulk_operation.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class InvalidBulkOperation < Error
2525
# @example Instantiate the exception.
2626
# Mongo::Error::InvalidBulkOperation.new(name)
2727
#
28-
# @param [ String ] name The attempted operation name.
28+
# @param [ String ] type The bulk operation type.
29+
# @param [ Hash ] operation The bulk operation.
2930
#
3031
# @since 2.0.0
3132
def initialize(type, operation)

lib/mongo/operation/aggregate.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ module Operation
3131
# :db_name => 'test_db'
3232
# })
3333
#
34-
# @param [ Hash ] spec The specifications for the operation.
34+
# Initialization:
35+
# param [ Hash ] spec The specifications for the operation.
3536
#
36-
# @option spec :selector [ Hash ] The aggregate selector.
37-
# @option spec :db_name [ String ] The name of the database on which
38-
# the operation should be executed.
39-
# @option spec :options [ Hash ] Options for the aggregate command.
37+
# option spec :selector [ Hash ] The aggregate selector.
38+
# option spec :db_name [ String ] The name of the database on which
39+
# the operation should be executed.
40+
# option spec :options [ Hash ] Options for the aggregate command.
4041
#
4142
# @since 2.0.0
4243
class Aggregate

lib/mongo/operation/command.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ module Operation
2020
# @example Create the command operation.
2121
# Mongo::Operation::Command.new({ :selector => { :isMaster => 1 } })
2222
#
23-
# @note A command is actually a query on the virtual '$cmd' collection.
23+
# Initialization:
24+
# param [ Hash ] spec The specifications for the command.
2425
#
25-
# @param [ Hash ] spec The specifications for the command.
26-
#
27-
# @option spec :selector [ Hash ] The command selector.
28-
# @option spec :db_name [ String ] The name of the database on which
26+
# option spec :selector [ Hash ] The command selector.
27+
# option spec :db_name [ String ] The name of the database on which
2928
# the command should be executed.
30-
# @option spec :options [ Hash ] Options for the command.
29+
# option spec :options [ Hash ] Options for the command.
3130
#
3231
# @since 2.0.0
3332
class Command

lib/mongo/operation/kill_cursors.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ module Operation
2020
# @example Create the kill cursors operation.
2121
# Mongo::Operation::KillCursor.new({ :cursor_ids => [1, 2] })
2222
#
23-
# @param [ Hash ] spec The specifications for the operation.
23+
# Initialization:
24+
# param [ Hash ] spec The specifications for the operation.
2425
#
25-
# @option spec :cursor_ids [ Array ] The ids of cursors to kill.
26+
# option spec :cursor_ids [ Array ] The ids of cursors to kill.
2627
#
2728
# @since 2.0.0
2829
class KillCursors

lib/mongo/operation/map_reduce.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ module Operation
3333
# :db_name => 'test_db'
3434
# })
3535
#
36-
# @param [ Hash ] spec The specifications for the operation.
36+
# Initialization:
37+
# param [ Hash ] spec The specifications for the operation.
3738
#
38-
# @option spec :selector [ Hash ] The map reduce selector.
39-
# @option spec :db_name [ String ] The name of the database on which
40-
# the operation should be executed.
41-
# @option spec :options [ Hash ] Options for the map reduce command.
39+
# option spec :selector [ Hash ] The map reduce selector.
40+
# option spec :db_name [ String ] The name of the database on which
41+
# the operation should be executed.
42+
# option spec :options [ Hash ] Options for the map reduce command.
4243
#
4344
# @since 2.0.0
4445
class MapReduce

lib/mongo/operation/read/collections_info.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ module Read
2121
# @example Create the collection names operation.
2222
# Read::CollectionNames.new(:db_name => 'test-db')
2323
#
24-
# @param [ Hash ] spec The specifications for the collection names operation.
24+
# Initialization:
25+
# param [ Hash ] spec The specifications for the collection names operation.
2526
#
26-
# @option spec :db_name [ String ] The name of the database whose collection
27-
# names is requested.
28-
# @option spec :options [ Hash ] Options for the operation.
27+
# option spec :db_name [ String ] The name of the database whose collection
28+
# names is requested.
29+
# option spec :options [ Hash ] Options for the operation.
2930
#
3031
# @since 2.0.0
3132
class CollectionsInfo

lib/mongo/operation/read/get_more.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ module Read
2626
# :coll_name => 'test_coll'
2727
# })
2828
#
29-
# @param [ Hash ] spec The specifications for the operation.
29+
# Initialization:
30+
# param [ Hash ] spec The specifications for the operation.
3031
#
31-
# @option spec :to_return [ Integer ] The number of results to return.
32-
# @option spec :cursor_id [ Integer ] The id of the cursor.
33-
# @option spec :db_name [ String ] The name of the database on which
34-
# the operation should be executed.
35-
# @option spec :coll_name [ String ] The name of the collection on which
36-
# the operation should be executed.
32+
# option spec :to_return [ Integer ] The number of results to return.
33+
# option spec :cursor_id [ Integer ] The id of the cursor.
34+
# option spec :db_name [ String ] The name of the database on which
35+
# the operation should be executed.
36+
# option spec :coll_name [ String ] The name of the collection on which
37+
# the operation should be executed.
3738
#
3839
# @since 2.0.0
3940
class GetMore

lib/mongo/operation/read/indexes.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ module Read
2323
# @example Instantiate the operation.
2424
# Read::Indexes.new(:db_name => 'test', :coll_name => 'test_coll')
2525
#
26-
# @param [ Hash ] spec The specifications for the insert.
26+
# Initialization:
27+
# param [ Hash ] spec The specifications for the insert.
2728
#
28-
# @option spec :db_name [ String ] The name of the database.
29-
# @option spec :coll_name [ String ] The name of the collection.
29+
# option spec :db_name [ String ] The name of the database.
30+
# option spec :coll_name [ String ] The name of the collection.
3031
#
3132
# @since 2.0.0
3233
class Indexes

lib/mongo/operation/read/list_collections.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ module Read
2525
#
2626
# @note A command is actually a query on the virtual '$cmd' collection.
2727
#
28-
# @param [ Hash ] spec The specifications for the command.
28+
# Initialization:
29+
# param [ Hash ] spec The specifications for the command.
2930
#
30-
# @option spec :db_name [ String ] The name of the database whose list of
31-
# collection names is requested.
32-
# @option spec :options [ Hash ] Options for the command.
31+
# option spec :db_name [ String ] The name of the database whose list of
32+
# collection names is requested.
33+
# option spec :options [ Hash ] Options for the command.
3334
#
3435
# @since 2.0.0
3536
class ListCollections

lib/mongo/operation/read/list_indexes.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ module Read
2525
#
2626
# @note A command is actually a query on the virtual '$cmd' collection.
2727
#
28-
# @param [ Hash ] spec The specifications for the command.
28+
# Initialization:
29+
# param [ Hash ] spec The specifications for the command.
2930
#
30-
# @option spec :coll_name [ Hash ] The name of the collection whose index
31-
# info is requested.
32-
# @option spec :db_name [ String ] The name of the database on which
33-
# the command should be executed.
34-
# @option spec :options [ Hash ] Options for the command.
31+
# option spec :coll_name [ Hash ] The name of the collection whose index
32+
# info is requested.
33+
# option spec :db_name [ String ] The name of the database on which
34+
# the command should be executed.
35+
# option spec :options [ Hash ] Options for the command.
3536
#
3637
# @since 2.0.0
3738
class ListIndexes

lib/mongo/operation/read/query.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ module Read
2626
# :options => { :limit => 2 }
2727
# })
2828
#
29-
# @param [ Hash ] spec The specifications for the query.
29+
# Initialization:
30+
# param [ Hash ] spec The specifications for the query.
3031
#
31-
# @option spec :selector [ Hash ] The query selector.
32-
# @option spec :db_name [ String ] The name of the database on which
33-
# the query should be run.
34-
# @option spec :coll_name [ String ] The name of the collection on which
35-
# the query should be run.
36-
# @option spec :options [ Hash ] Options for the query.
32+
# option spec :selector [ Hash ] The query selector.
33+
# option spec :db_name [ String ] The name of the database on which
34+
# the query should be run.
35+
# option spec :coll_name [ String ] The name of the collection on which
36+
# the query should be run.
37+
# option spec :options [ Hash ] Options for the query.
3738
#
3839
# @since 2.0.0
3940
class Query

lib/mongo/operation/write/bulk/bulk_delete.rb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,20 @@ module Write
3131
# :write_concern => write_concern
3232
# })
3333
#
34-
# @param [ Hash ] spec The specifications for the delete.
34+
# Initialization:
35+
# param [ Hash ] spec The specifications for the delete.
3536
#
36-
# @option spec :deletes [ Array ] The delete documents.
37-
# @option spec :db_name [ String ] The name of the database on which
38-
# the delete should be executed.
39-
# @option spec :coll_name [ String ] The name of the collection on which
40-
# the delete should be executed.
41-
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern
42-
# for this operation.
43-
# @option spec :ordered [ true, false ] Whether the operations should be
44-
# executed in order.
45-
# @option spec :options [Hash] Options for the command, if it ends up being a
46-
# write command.
37+
# option spec :deletes [ Array ] The delete documents.
38+
# option spec :db_name [ String ] The name of the database on which
39+
# the delete should be executed.
40+
# option spec :coll_name [ String ] The name of the collection on which
41+
# the delete should be executed.
42+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern
43+
# for this operation.
44+
# option spec :ordered [ true, false ] Whether the operations should be
45+
# executed in order.
46+
# option spec :options [Hash] Options for the command, if it ends up being a
47+
# write command.
4748
#
4849
# @since 2.0.0
4950
class BulkDelete

lib/mongo/operation/write/bulk/bulk_insert.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ module Write
3333
# :ordered => false
3434
# })
3535
#
36-
# @param [ Hash ] spec The specifications for the insert.
36+
# Initialization:
37+
# param [ Hash ] spec The specifications for the insert.
3738
#
38-
# @option spec :documents [ Array ] The documents to insert.
39-
# @option spec :db_name [ String ] The name of the database.
40-
# @option spec :coll_name [ String ] The name of the collection.
41-
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern.
42-
# @option spec :ordered [ true, false ] Whether the operations should be
43-
# executed in order.
44-
# @option spec :options [ Hash ] Options for the command, if it ends up being a
45-
# write command.
39+
# option spec :documents [ Array ] The documents to insert.
40+
# option spec :db_name [ String ] The name of the database.
41+
# option spec :coll_name [ String ] The name of the collection.
42+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
43+
# option spec :ordered [ true, false ] Whether the operations should be
44+
# executed in order.
45+
# option spec :options [ Hash ] Options for the command, if it ends up being a
46+
# write command.
4647
#
4748
# @since 2.0.0
4849
class BulkInsert

lib/mongo/operation/write/bulk/bulk_insert/result.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Result < Operation::Result
3737
# Result.new(replies, inserted_ids)
3838
#
3939
# @param [ Protocol::Reply ] replies The wire protocol replies.
40-
# @params [ Array<Object> ] ids The ids of the inserted documents.
40+
# @param [ Array<Object> ] ids The ids of the inserted documents.
4141
#
4242
# @since 2.0.0
4343
def initialize(replies, ids)
@@ -88,7 +88,7 @@ class LegacyResult < Operation::Result
8888
# Result.new(replies, inserted_ids)
8989
#
9090
# @param [ Protocol::Reply ] replies The wire protocol replies.
91-
# @params [ Array<Object> ] ids The ids of the inserted documents.
91+
# @param [ Array<Object> ] ids The ids of the inserted documents.
9292
#
9393
# @since 2.0.0
9494
def initialize(replies, ids)

lib/mongo/operation/write/bulk/bulk_update.rb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,19 @@ module Write
3939
# :ordered => false
4040
# })
4141
#
42-
# @param [ Hash ] spec The specifications for the update.
42+
# Initialization:
43+
# param [ Hash ] spec The specifications for the update.
4344
#
44-
# @option spec :updates [ Array ] The update documents.
45-
# @option spec :db_name [ String ] The name of the database on which
46-
# the query should be run.
47-
# @option spec :coll_name [ String ] The name of the collection on which
48-
# the query should be run.
49-
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern.
50-
# @option spec :ordered [ true, false ] Whether the operations should be
51-
# executed in order.
52-
# @option spec :options [ Hash ] Options for the command, if it ends up being a
53-
# write command.
45+
# option spec :updates [ Array ] The update documents.
46+
# option spec :db_name [ String ] The name of the database on which
47+
# the query should be run.
48+
# option spec :coll_name [ String ] The name of the collection on which
49+
# the query should be run.
50+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern.
51+
# option spec :ordered [ true, false ] Whether the operations should be
52+
# executed in order.
53+
# option spec :options [ Hash ] Options for the command, if it ends up being a
54+
# write command.
5455
#
5556
# @since 2.0.0
5657
class BulkUpdate

lib/mongo/operation/write/create_index.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ module Write
3030
# :index_name => 'name_1_age_-1'
3131
# })
3232
#
33-
# @param [ Hash ] spec The specifications for the insert.
33+
# Initialization:
34+
# param [ Hash ] spec The specifications for the insert.
3435
#
35-
# @option spec :index [ Hash ] The index spec to create.
36-
# @option spec :db_name [ String ] The name of the database.
37-
# @option spec :coll_name [ String ] The name of the collection.
38-
# @option spec :index_name [ String ] The name of the index.
39-
# @option spec :options [ Hash ] Options for the command, if it ends up being a
40-
# write command.
36+
# option spec :index [ Hash ] The index spec to create.
37+
# option spec :db_name [ String ] The name of the database.
38+
# option spec :coll_name [ String ] The name of the collection.
39+
# option spec :index_name [ String ] The name of the index.
40+
# option spec :options [ Hash ] Options for the command, if it ends up being a
41+
# write command.
4142
#
4243
# @since 2.0.0
4344
class CreateIndex

lib/mongo/operation/write/create_user.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ module Write
2222
# @example Initialize the operation.
2323
# Write::CreateUser.new(:db_name => 'test', :user => user)
2424
#
25-
# @param [ Hash ] spec The specifications for the create.
25+
# Initialization:
26+
# param [ Hash ] spec The specifications for the create.
2627
#
27-
# @option spec :user [ Auth::User ] The user to create.
28-
# @option spec :db_name [ String ] The name of the database.
28+
# option spec :user [ Auth::User ] The user to create.
29+
# option spec :db_name [ String ] The name of the database.
2930
#
3031
# @since 2.0.0
3132
class CreateUser

lib/mongo/operation/write/delete.rb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,20 @@ module Write
3131
# :write_concern => write_concern
3232
# })
3333
#
34-
# @param [ Hash ] spec The specifications for the delete.
34+
# Initialization:
35+
# param [ Hash ] spec The specifications for the delete.
3536
#
36-
# @option spec :delete [ Hash ] The delete document.
37-
# @option spec :db_name [ String ] The name of the database on which
38-
# the delete should be executed.
39-
# @option spec :coll_name [ String ] The name of the collection on which
40-
# the delete should be executed.
41-
# @option spec :write_concern [ Mongo::WriteConcern ] The write concern
42-
# for this operation.
43-
# @option spec :ordered [ true, false ] Whether the operations should be
44-
# executed in order.
45-
# @option spec :options [Hash] Options for the command, if it ends up being a
46-
# write command.
37+
# option spec :delete [ Hash ] The delete document.
38+
# option spec :db_name [ String ] The name of the database on which
39+
# the delete should be executed.
40+
# option spec :coll_name [ String ] The name of the collection on which
41+
# the delete should be executed.
42+
# option spec :write_concern [ Mongo::WriteConcern ] The write concern
43+
# for this operation.
44+
# option spec :ordered [ true, false ] Whether the operations should be
45+
# executed in order.
46+
# option spec :options [Hash] Options for the command, if it ends up being a
47+
# write command.
4748
#
4849
# @since 2.0.0
4950
class Delete

0 commit comments

Comments
 (0)