Created
June 8, 2011 02:27
-
-
Save k2052/1013668 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Everything | |
@@match = Struct.new(:captures) | |
def initialize(*exceptions) | |
@exceptions = exceptions | |
@captures = @@match.new([]) | |
end | |
def match(str) | |
@captures | |
end | |
end | |
def everything(*args) | |
Everything.new(*args) | |
end | |
TestingRoutes.controllers :main do | |
before everything(:index) do | |
@test = 'cow' | |
puts 'hi' | |
end | |
get :index, :map => "/example" do | |
puts @test | |
"Hello world!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment