crouter icon indicating copy to clipboard operation
crouter copied to clipboard

Routes are not evaluated in the context of the enclosing class

Open RomanHargrave opened this issue 9 years ago • 1 comments

Example:

class RouterExample < Crouter::Router
    @instance_var = ""
    post "/" do 
        @instance_var # Compiler error: "can't use instance variables at the top level"
    end
end

RomanHargrave avatar Apr 06 '17 08:04 RomanHargrave

I'm having the same problem too. I'm new to Crystal/Ruby, I don't know much detail but what is the status of this issue? Is this ever going to be resolved?

ibrahimduran avatar Oct 31 '17 19:10 ibrahimduran