Module: Trialday

Defined in:
lib/trialday/base.rb,
lib/trialday/main.rb,
lib/trialday/router.rb

Overview

Trialday Application

Rack Applications needs an object which will have a ‘call’ method. This call method can be simple and just return a HTTP response. In our scenario this class will get the reference from Rack::Request and call the ‘serve_request’ method.

The serve_request method returns the Trialday::Router. the ida is to have an main object to orchestrate the possible calls to the framework API.

To start up the Rack server we use ruby’s at_exist method. This will ensure that the Router object will be completely ready for Rack to server, in this case, using WEBrick.

see Sinatra: /lib/sinatra/main.rb#L26

Defined Under Namespace

Modules: Delegator Classes: Application, Base, Router