Class: SockJS::Examples::ProtocolConformanceTest::MyHelloWorld

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

Constant Summary collapse

BODY =
[<<-HTML].freeze
<html>
  <head>
    <title>Hello World!</title>
  </head>

  <body>
    <h1>Hello World!</h1>
    <p>
      This is the app, not SockJS.
    </p>
  </body>
</html>
HTML

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



24
25
26
# File 'lib/sockjs/examples/protocol_conformance_test.rb', line 24

def call(env)
  [200, {"Content-Type" => "text/html; charset=UTF-8", "Content-Length" => BODY.join("").bytesize.to_s}, BODY]
end