Sha256: 057353f334fb8efefa35f1819521a6c55c141098e7099ddcc3529af01db8c2e5

Contents?: true

Size: 449 Bytes

Versions: 1

Compression:

Stored size: 449 Bytes

Contents

require "thomler/version"
require "thomler/array"
require "thomler/routing"

module Thomler
  class Application
    def call env
      klass, act = get_controller_and_action(env)
      controller = klass.new(env)
      text = controller.send(act)
      [200, {'Content-Type' => 'text/html'}, ["Hello from Ruby on Thomler!"]]
    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.2 lib/thomler.rb