Skip to content

Commit a7005ab

Browse files
committed
RUBY-705 Clean up API documentation
1 parent f881675 commit a7005ab

File tree

14 files changed

+25
-22
lines changed

14 files changed

+25
-22
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ Installation
77

88
**Gem Installation**<br>
99
The Ruby driver is released and distributed through RubyGems and it can be installed with the following command:
10+
1011
```bash
1112
gem install mongo
1213
```
14+
1315
For a significant performance boost, you'll want to install the C-extension:
16+
1417
```bash
1518
gem install bson_ext
1619
```
20+
1721
**Github Installation**<br>
1822
For development and test environments (not recommended for production) you can also install the Ruby driver directly from source:
1923

@@ -36,6 +40,7 @@ rake install
3640
Usage
3741
-----
3842
Here is a quick example of basic usage for the Ruby driver:
43+
3944
```ruby
4045
require 'mongo'
4146
include Mongo

lib/bson/types/binary.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Binary < ByteBuffer
3535
#
3636
# @param [Array, String] data to story as BSON binary. If a string is given, the on
3737
# Ruby 1.9 it will be forced to the binary encoding.
38-
# @param [Fixnum] one of four values specifying a BSON binary subtype. Possible values are
38+
# @param [Fixnum] subtype one of four values specifying a BSON binary subtype. Possible values are
3939
# SUBTYPE_BYTES, SUBTYPE_UUID, SUBTYPE_MD5, and SUBTYPE_USER_DEFINED.
4040
#
4141
# @see http://www.mongodb.org/display/DOCS/BSON#BSON-noteondatabinary BSON binary subtypes.

lib/bson/types/code.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Code
2323
# Wrap code to be evaluated by MongoDB.
2424
#
2525
# @param [String] code the JavaScript code.
26-
# @param [Hash] a document mapping identifiers to values, which
26+
# @param [Hash] scope a document mapping identifiers to values, which
2727
# represent the scope in which the code is to be executed.
2828
def initialize(code, scope={})
2929
@code = code

lib/bson/types/dbref.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class DBRef
2121

2222
# Create a DBRef. Use this class in conjunction with DB#dereference.
2323
#
24-
# @param [String] a collection name
25-
# @param [ObjectId] an object id
24+
# @param [String] namespace a collection name.
25+
# @param [ObjectId] object_id an object id.
2626
def initialize(namespace, object_id)
2727
@namespace = namespace
2828
@object_id = object_id

lib/bson/types/regex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Regex
3232
# Create a new regexp.
3333
#
3434
# @param pattern [String]
35-
# @param options [Array, String]
35+
# @param opts [Array, String]
3636
def initialize(pattern, *opts)
3737
@pattern = pattern
3838
@options = opts.first.is_a?(Fixnum) ? opts.first : str_opts_to_int(opts.join)

lib/mongo/collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def hint=(hint=nil)
159159
end
160160

161161
# Set a hint field using a named index.
162-
# @param [String] hinted index name
162+
# @param [String] hint index name
163163
def named_hint=(hint=nil)
164164
@hint = hint
165165
self

lib/mongo/cursor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def has_next?
189189

190190
# Get the size of the result set for this query.
191191
#
192-
# @param [Boolean] whether of not to take notice of skip and limit
192+
# @param [Boolean] skip_and_limit whether or not to take skip or limit into account.
193193
#
194194
# @return [Integer] the number of objects in the result set for this query.
195195
#

lib/mongo/functional/authentication.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def issue_gssapi(auth, opts={})
296296

297297
# Helper to fetch a nonce value from a given database instance.
298298
#
299-
# @param db [Mongo::DB] The DB instance to use for issue the nonce command.
299+
# @param database [Mongo::DB] The DB instance to use for issue the nonce command.
300300
# @param opts [Hash] Hash of optional settings and configuration values.
301301
#
302302
# @option opts [Socket] socket (nil) Optional socket instance to use.

lib/mongo/functional/uri_parser.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ class URIParser
153153
# @note Passwords can contain any character except for ','
154154
#
155155
# @param [String] uri The MongoDB URI string.
156-
# @param [Hash,nil] extra_opts Extra options. Will override anything
157-
# already specified in the URI.
158156
def initialize(uri)
159157
if uri.start_with?('mongodb://')
160158
uri = uri[10..-1]

lib/mongo/gridfs/grid.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def put(data, opts={})
8181

8282
# Read a file from the file store.
8383
#
84-
# @param [] id the file's unique id.
84+
# @param id the file's unique id.
8585
#
8686
# @return [Mongo::GridIO]
8787
def get(id)
@@ -95,7 +95,7 @@ def get(id)
9595
# is attempting to read a file while it's being deleted. While the odds for this
9696
# kind of race condition are small, it's important to be aware of.
9797
#
98-
# @param [] id
98+
# @param id
9999
#
100100
# @return [Boolean]
101101
def delete(id)

0 commit comments

Comments
 (0)