lib/roda.rb
# Setup routing tree for the current Roda application, and build the
# underlying rack application using the stored middleware. Requires
# a block, which is yielded the request.  By convention, the block
# argument should be named +r+.  Example:
#
#   Roda.route do |r|
#     r.root do
#       "Root"
#     end
#   end
#
# This should only be called once per class, and if called multiple
# times will overwrite the previous routing.
Setup routing tree for the current Roda application, and build the
underlying rack application using the stored middleware. Requires
a block, which is yielded the request.  By convention, the block
argument should be named +r+.  Example.



This should only be called once per class, and if called multiple
times will overwrite the previous routing.
Setup routing tree for the current Roda application and build the underlying rack application using the stored middleware . Requires a block which is yielded the request . By convention the block argument should be named + r + . Example . This should only be called once per class and if called multiple times will overwrite the previous routing .
def route(&block)
          unless block
            RodaPlugins.warn "no block passed to Roda.route"
            return
          end
          @raw_route_block = block
          @route_block = block = convert_route_block(block)
          @rack_app_route_block = block = rack_app_route_block(block)
          public define_roda_method(:_roda_main_route, 1, &block)
          @app = nil
        end
def route ( & block ) unless block RodaPlugins . warn "no block passed to Roda.route" return end @raw_route_block = block @route_block = block = convert_route_block ( block ) @rack_app_route_block = block = rack_app_route_block ( block ) public define_roda_method ( :_roda_main_route , 1 , & block ) @app = nil end
Setup routing tree for the current Roda application, and build the
underlying rack application using the stored middleware.
Setup routing tree for the current Roda application and build the underlying rack application using the stored middleware .
block