class Shaf::Router::MethodNotAllowedResponder

Attributes

supported_methods[R]

Public Class Methods

new(supported_methods) click to toggle source
# File lib/shaf/router.rb, line 11
def initialize(supported_methods)
  @supported_methods = supported_methods
end

Public Instance Methods

allowed() click to toggle source
# File lib/shaf/router.rb, line 15
def allowed
  supported_methods.join(', ')
end
call(env) click to toggle source
# File lib/shaf/router.rb, line 19
def call(env)
  [405, {'Allow' => allowed}, '']
end