lib/roda/plugins/not_allowed.rb
def is(*args)
          super(*args) do
            begin
              is_verbs = @_is_verbs = []

              ret = if args.empty?
                yield
              else
                yield(*captures)
              end

              unless is_verbs.empty?
                method_not_allowed(is_verbs.join(', '))
              end

              ret
            ensure
              @_is_verbs = nil
            end
          end
        end
# Keep track of verb calls inside the block.  If there are any
# verb calls inside the block, but the block returned, assume
# that the verb calls inside the block did not match, and
# since there was already a successful terminal match, the
# request method must not be allowed, so return a 405
# response in that case.
Keep track of verb calls inside the block.  If there are any
verb calls inside the block, but the block returned, assume
that the verb calls inside the block did not match, and
since there was already a successful terminal match, the
request method must not be allowed, so return a 405
response in that case.
Keep track of verb calls inside the block . If there are any verb calls inside the block but the block returned assume that the verb calls inside the block did not match and since there was already a successful terminal match the request method must not be allowed so return a 405 response in that case .
def is(*args)
          super(*args) do
            begin
              is_verbs = @_is_verbs = []
              ret = if args.empty?
                yield
              else
                yield(*captures)
              end
              unless is_verbs.empty?
                method_not_allowed(is_verbs.join(', '))
              end
              ret
            ensure
              @_is_verbs = nil
            end
          end
        end
def is ( * args ) super ( * args ) do begin is_verbs = @_is_verbs = [ ] ret = if args . empty? yield else yield ( * captures ) end unless is_verbs . empty? method_not_allowed ( is_verbs . join ( ', ' ) ) end ret ensure @_is_verbs = nil end end end
Keep track of verb calls inside the block.
Keep track of verb calls inside the block .
args