Sha256: a3eef1d50573a258786ee012953612ad67a013a57a432d3b55dfb73e7b275371

Contents?: true

Size: 252 Bytes

Versions: 6

Compression:

Stored size: 252 Bytes

Contents

require 'kontrol'

class Routing < Kontrol::Application
  map do
    get '/pages/(.*)' do |name|
      "This is the page #{name}!"
    end

    get '/(\d*)/(\d*)' do |year, month|
      "Archive for #{year}/#{month}"
    end
  end
end

run Routing.new

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
georgi-kontrol-0.1.1 examples/routing.ru
georgi-kontrol-0.1.2 examples/routing.ru
georgi-kontrol-0.1.3 examples/routing.ru
georgi-kontrol-0.1.4 examples/routing.ru
georgi-kontrol-0.1.5 examples/routing.ru
georgi-kontrol-0.1.6 examples/routing.ru