Method: Rack::Builder#map

Defined in:
lib/rack/builder.rb

#map(path, &block) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/rack/builder.rb', line 61

def map(path, &block)
  if @ins.last.kind_of? Hash
    @ins.last[path] = self.class.new(&block).to_app
  else
    @ins << {}
    map(path, &block)
  end
end