Sinatra Request Object
问题 I'm probably missing something painfully obvious here, but I can't seem to find an answer, or work it out myself. In Sinatra, they have a self.get method, which captures blocks, when a block is called, you're able to use the request variable inside, how is this possible? Sinatra module Sinatra class Base class Request < Rack::Request end attr_accessor :request def call!(env) @request = Request.new(env) end class << self def get(path, opts = {}, &block) ... end end end end App class App <