Sha256: 92d1806ba4ea5ef676bc042431dab9db434b9b67549b425176446bc736a0ada8
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
require "rulers/version" require "rulers/routing" require "rulers/util" require "rulers/dependencies" module Rulers class Application def call(env) if env['PATH_INFO'] == '/favicon.ico' return [404, {'Content-Type' => 'text/html'}, []] end if env['PATH_INFO'] == '/' return [204, {'Content-Type'=> 'text/html'},["Incorrect URL!!!!"]] end klass, act = get_controller_and_action(env) controller = klass.new(env) text = controller.send(act) [200, {'Content-Type' => 'text/html'}, [text]] end end class Controller def initialize(env) @env = env end def env @env end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
erik_rulers-0.0.5 | lib/rulers.rb |
erik_rulers-0.0.4 | lib/rulers.rb |