lib/roda/plugins/all_verbs.rb in roda-3.33.0 vs lib/roda/plugins/all_verbs.rb in roda-3.34.0
- old
+ new
@@ -32,10 +32,12 @@
# The verb methods are defined via metaprogramming, so there
# isn't documentation for the individual methods created.
module AllVerbs
module RequestMethods
%w'delete head options link patch put trace unlink'.each do |verb|
+ # :nocov:
if ::Rack::Request.method_defined?("#{verb}?")
+ # :nocov:
class_eval(<<-END, __FILE__, __LINE__+1)
def #{verb}(*args, &block)
_verb(args, &block) if #{verb}?
end
END