Sha256: 45b3c4d5ff169c1b9349ccc6ccab0be13da2509c8a29dd4a97f5d1912f4d8bd2
Contents?: true
Size: 641 Bytes
Versions: 1
Compression:
Stored size: 641 Bytes
Contents
require "thomler/version" require "thomler/array" require "thomler/routing" module Thomler class Application def call env if env['PATH_INFO'] == '/favicon.ico' return [404, {'Content-Type' => 'text/html'}, []] end klass, act = get_controller_and_action(env) controller = klass.new(env) begin text = controller.send(act) rescue Exception return [404, {'Content-Type' => 'text/html'}, []] end [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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
thomler-0.1.8 | lib/thomler.rb |