Class: SockJS::Endpoint::MethodNotSupportedApp

Inherits:
Object
  • Object
show all
Defined in:
lib/sockjs/transport.rb

Instance Method Summary collapse

Constructor Details

#initialize(methods) ⇒ MethodNotSupportedApp

Returns a new instance of MethodNotSupportedApp.



33
34
35
# File 'lib/sockjs/transport.rb', line 33

def initialize(methods)
  @allowed_methods = methods
end

Instance Method Details

#call(env) ⇒ Object



43
44
45
# File 'lib/sockjs/transport.rb', line 43

def call(env)
  return response
end

#responseObject



37
38
39
40
41
# File 'lib/sockjs/transport.rb', line 37

def response
  ::SockJS.debug "Method not supported! (app)"
  @response ||=
    [405, {"Allow" => @allowed_methods.join(",")}, []].freeze
end