Module: Hobby

Includes:
Helpers
Defined in:
lib/hobby.rb,
lib/hobby/router.rb,
lib/hobby/helpers.rb

Defined Under Namespace

Modules: Helpers, Singleton Classes: Router

Constant Summary collapse

VERBS =
%w[DELETE GET HEAD OPTIONS PATCH POST PUT]

Instance Attribute Summary

Attributes included from Helpers

#env, #route

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#content_type, #halt, #my, #not_found, #request, #response, #router, #script_name, #status

Class Method Details

.included(app) ⇒ Object



10
11
12
13
14
# File 'lib/hobby.rb', line 10

def self.included app
  app.extend Singleton
  app.router = Router.new
  app.request, app.response = Rack::Request, Rack::Response
end

Instance Method Details

#call(env) ⇒ Object



35
36
37
# File 'lib/hobby.rb', line 35

def call env
  dup.handle env
end