Sha256: 69c6730616497290327d1b53f22cb0e52ca246e42543fea7ac3f052b7732b20d

Contents?: true

Size: 249 Bytes

Versions: 8

Compression:

Stored size: 249 Bytes

Contents

module Thomler
  class Application
    def get_controller_and_action env
      _, cont, action, after = env["PATH_INFO"].split('/', 4)
      cont = cont.capitalize
      cont += "Controller"

      [Object.const_get(cont), action]
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
thomler-0.1.8 lib/thomler/routing.rb
thomler-0.1.7 lib/thomler/routing.rb
thomler-0.1.6 lib/thomler/routing.rb
thomler-0.1.5 lib/thomler/routing.rb
thomler-0.1.4 lib/thomler/routing.rb
thomler-0.1.3 lib/thomler/routing.rb
thomler-0.1.2 lib/thomler/routing.rb
thomler-0.1.1 lib/thomler/routing.rb