From ee5b6a74e9097c31542b10d9a32e3d3bdfc4822b Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Sun, 28 Jun 2020 13:55:17 -0500 Subject: [PATCH] Added :call-seq: to RDOc for some methods --- lib/json/common.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/json/common.rb b/lib/json/common.rb index c17c0ec3..991d7604 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -141,6 +141,9 @@ class MissingUnicodeSupport < JSONError; end 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 @@ def parse(source, opts = {}) 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 @@ def parse!(source, opts = {}) 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 @@ def fast_generate(obj, opts = nil) 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. #