summaryrefslogtreecommitdiff
path: root/ext/json/lib
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2020-06-28 13:55:17 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-01 18:47:51 +0900
commitd69b55ac05e67a22ce3fb0783cced2460b45a52b (patch)
tree6c11a94138ec6bb905cfa99b2ae5403d8ab18103 /ext/json/lib
parentcb3e62511c7c7a7d568342d82b641e491ce589e1 (diff)
[flori/json] Added :call-seq: to RDOc for some methods
https://github.com/flori/json/commit/ee5b6a74e9
Diffstat (limited to 'ext/json/lib')
-rw-r--r--ext/json/lib/json/common.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb
index c17c0ec33f4..991d7604fd3 100644
--- a/ext/json/lib/json/common.rb
+++ b/ext/json/lib/json/common.rb
@@ -141,6 +141,9 @@ module JSON
module_function
+ # :call-seq:
+ # JSON.parse(source, opts) -> object
+ #
# Argument +source+ contains the \String to be parsed. It must be a
# {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects]
# (implementing +to_str+), and must contain valid \JSON data.
@@ -260,6 +263,9 @@ module JSON
Parser.new(source, **(opts||{})).parse
end
+ # :call-seq:
+ # JSON.parse!(source, opts) -> object
+ #
# Calls
# parse(source, opts)
# with +source+ and possibly modified +opts+.
@@ -276,6 +282,9 @@ module JSON
Parser.new(source, **(opts||{})).parse
end
+ # :call-seq:
+ # JSON.generate(obj, opts = nil) -> new_string
+ #
# Argument +obj+ is the Ruby object to be converted to \JSON.
#
# Argument +opts+, if given, contains options for the generation, and must be a
@@ -463,6 +472,9 @@ module JSON
module_function :fast_unparse
# :startdoc:
+ # :call-seq:
+ # JSON.pretty_generate(obj, opts = nil) -> new_string
+ #
# Arguments +obj+ and +opts+ here are the same as
# arguments +obj+ and +opts+ in JSON.generate.
#