1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
Commit graph

3 commits

Author SHA1 Message Date
TJ Holowaychuk
d6ceeb0b56 Added proc as argument for #route_added hook 2009-04-19 20:04:50 -07:00
Simon Rozet
ff0d068687 Use contest instead of test/spec/mini
See <http://github.com/citrusbyte/contest> for more info. The
contest.rb file is included under the test/ directory.
2009-03-31 02:23:48 -07:00
Blake Mizerany
8b8ddfef56 Hook mechanizm for route_added [help from rtomayko]
Example:

module Sinatra
  module RouteAddedExtSample
    def self.route_added(verb, path)
      p [verb, path]
    end
  end

  register RouteAddedExtSample
end

post '/' do
  do_something
  'ok'
end

Output:

["POST", "/"]

move superclass logic into extensions attr reader
2009-03-09 22:58:37 -07:00