Class: ObjectsFramework::Server
- Inherits:
-
Object
- Object
- ObjectsFramework::Server
- Defined in:
- lib/objectsframework/server.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize ⇒ Server
Returns a new instance of Server.
3 4 5 |
# File 'lib/objectsframework/server.rb', line 3 def initialize end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/objectsframework/server.rb', line 7 def call(env) request = Rack::Request.new(env) response = Rack::Response.new(env) # Solves some weird bug where ENV is added to the response body response.body = [] response.length = 0 # Set text/html as Content-type by default response.header["Content-type"] = "text/html" ObjectsFramework::ObjectHandler.run_methods(request,response); response.finish end |