Sha256: fe2e87b8a8010aed3ffe3f440464bfb8093cbc3c385566828f5507d0508f57f1
Contents?: true
Size: 587 Bytes
Versions: 2
Compression:
Stored size: 587 Bytes
Contents
# encoding: utf-8 module Rango module UrlHelper # url(:login) def url(*args) raise "Your router or your router adapter doesn't support this method" end end Helpers.send(:include, UrlHelper) class Router @@routers = Hash.new unless defined?(@@routers) def self.implement(router, &block) @@routers[router] = block end def self.use(router) require_relative "router/adapters/#{router}" Rango.logger.debug("Using router #{router}") define_method(:set_rack_env, @@routers[router]) @@router = router end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rango-0.1.0 | lib/rango/router.rb |
rango-0.0.6 | lib/rango/router.rb |