We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d713720 commit 6b9dd5aCopy full SHA for 6b9dd5a
1 file changed
src/targets/ruby/native.js
@@ -14,7 +14,7 @@ module.exports = function (source, options) {
14
var method = source.method.toUpperCase()
15
var methods = ['GET', 'POST', 'HEAD', 'DELETE', 'PATCH', 'PUT', 'OPTIONS', 'COPY', 'LOCK', 'UNLOCK', 'MOVE', 'TRACE']
16
var capMethod = method.charAt(0) + method.substring(1).toLowerCase()
17
- if (methods.indexOf(this.source.method.toLowerCase()) === 0) {
+ if (methods.indexOf(method) < 0) {
18
code.push('class Net::HTTP::%s < Net::HTTPRequest')
19
code.push(util.format('class Net::HTTP::%s < Net::HTTPRequest', capMethod))
20
code.push(util.format(' METHOD = \'%s\'', method.toUpperCase()))
0 commit comments