Skip to content

Commit b20cdca

Browse files
authored
Merge pull request #422 from BurdetteLamar/master
Added :call-seq: to RDoc for some methods
2 parents 3d1c6a9 + ee5b6a7 commit b20cdca

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/json/common.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ class MissingUnicodeSupport < JSONError; end
141141

142142
module_function
143143

144+
# :call-seq:
145+
# JSON.parse(source, opts) -> object
146+
#
144147
# Argument +source+ contains the \String to be parsed. It must be a
145148
# {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects]
146149
# (implementing +to_str+), and must contain valid \JSON data.
@@ -260,6 +263,9 @@ def parse(source, opts = {})
260263
Parser.new(source, **(opts||{})).parse
261264
end
262265

266+
# :call-seq:
267+
# JSON.parse!(source, opts) -> object
268+
#
263269
# Calls
264270
# parse(source, opts)
265271
# with +source+ and possibly modified +opts+.
@@ -276,6 +282,9 @@ def parse!(source, opts = {})
276282
Parser.new(source, **(opts||{})).parse
277283
end
278284

285+
# :call-seq:
286+
# JSON.generate(obj, opts = nil) -> new_string
287+
#
279288
# Argument +obj+ is the Ruby object to be converted to \JSON.
280289
#
281290
# Argument +opts+, if given, contains options for the generation, and must be a
@@ -463,6 +472,9 @@ def fast_generate(obj, opts = nil)
463472
module_function :fast_unparse
464473
# :startdoc:
465474

475+
# :call-seq:
476+
# JSON.pretty_generate(obj, opts = nil) -> new_string
477+
#
466478
# Arguments +obj+ and +opts+ here are the same as
467479
# arguments +obj+ and +opts+ in JSON.generate.
468480
#

0 commit comments

Comments
 (0)