Skip to content

Commit 5093cd2

Browse files
committed
Added least documents
1 parent 52b8acf commit 5093cd2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/ruby2_keywords.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
class Module
22
unless private_method_defined?(:ruby2_keywords, true)
3+
# call-seq:
4+
# ruby2_keywords(method_name, ...)
5+
#
6+
# Does nothing.
37
private
48
def ruby2_keywords(name, *)
59
# nil
@@ -9,13 +13,21 @@ def ruby2_keywords(name, *)
913

1014
main = TOPLEVEL_BINDING.receiver
1115
unless main.respond_to?(:ruby2_keywords, true)
16+
# call-seq:
17+
# ruby2_keywords(method_name, ...)
18+
#
19+
# Does nothing.
1220
def main.ruby2_keywords(name, *)
1321
# nil
1422
end
1523
end
1624

1725
class Proc
1826
unless method_defined?(:ruby2_keywords)
27+
# call-seq:
28+
# proc.ruby2_keywords -> proc
29+
#
30+
# Does nothing and just returns the receiver.
1931
def ruby2_keywords
2032
self
2133
end
@@ -24,12 +36,20 @@ def ruby2_keywords
2436

2537
class << Hash
2638
unless method_defined?(:ruby2_keywords_hash?)
39+
# call-seq:
40+
# Hash.ruby2_keywords_hash?(hash) -> false
41+
#
42+
# Returns false.
2743
def ruby2_keywords_hash?(hash)
2844
false
2945
end
3046
end
3147

3248
unless method_defined?(:ruby2_keywords_hash)
49+
# call-seq:
50+
# Hash.ruby2_keywords_hash(hash) -> new_hash
51+
#
52+
# Duplicates a given hash and returns the new hash.
3353
def ruby2_keywords_hash(hash)
3454
hash.dup
3555
end

0 commit comments

Comments
 (0)