Skip to content

Commit d16c545

Browse files
committed
Improved documentation for Protocol::HTTP::Methods.
1 parent d3c27a4 commit d16c545

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/protocol/http/methods.rb

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class Methods
5050
# The PATCH method applies partial modifications to a resource.
5151
PATCH = "PATCH"
5252

53+
# Check if the given name is a valid HTTP method, according to this module.
54+
#
55+
# Note that this method only knows about the methods defined in this module, however there are many other methods defined in different specifications.
56+
#
57+
# @returns [Boolean] True if the name is a valid HTTP method.
5358
def self.valid?(name)
5459
const_defined?(name)
5560
rescue NameError

0 commit comments

Comments
 (0)