Skip to content

Commit b92a92a

Browse files
[DOC] More on JSON extensions (ruby#8898)
1 parent 2524c8b commit b92a92a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

range.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,6 +2609,7 @@ range_overlap(VALUE range, VALUE other)
26092609
* - {Comparing}[rdoc-ref:Range@Methods+for+Comparing]
26102610
* - {Iterating}[rdoc-ref:Range@Methods+for+Iterating]
26112611
* - {Converting}[rdoc-ref:Range@Methods+for+Converting]
2612+
* - {Methods for Working with JSON}[rdoc-ref:Range@Methods+for+Working+with+JSON]
26122613
*
26132614
* === Methods for Creating a \Range
26142615
*
@@ -2651,6 +2652,16 @@ range_overlap(VALUE range, VALUE other)
26512652
* - #to_a (aliased as #entries): Returns elements of +self+ in an array.
26522653
* - #to_s: Returns a string representation of +self+ (uses #to_s).
26532654
*
2655+
* === Methods for Working with \JSON
2656+
*
2657+
* - ::json_create: Returns a new \Range object constructed from the given object.
2658+
* - #as_json: Returns a 2-element hash representing +self+.
2659+
* - #to_json: Returns a \JSON string representing +self+.
2660+
*
2661+
* To make these methods available:
2662+
*
2663+
* require 'json/add/range'
2664+
*
26542665
*/
26552666

26562667
void

0 commit comments

Comments
 (0)