lib/roda/plugins/hash_routes.rb
# Use the segment to setup a path in the current namespace that
# will render the view with the given name if the GET method is
# used, and will return a 404 if another request method is used.
# If path is given as a string, it is prefixed with a slash.
# If path is +true+, the empty string is used as the path.
Use the segment to setup a path in the current namespace that
will render the view with the given name if the GET method is
used, and will return a 404 if another request method is used.
If path is given as a string, it is prefixed with a slash.
If path is +true+, the empty string is used as the path.
Use the segment to setup a path in the current namespace that will render the view with the given name if the GET method is used and will return a 404 if another request method is used . If path is given as a string it is prefixed with a slash . If path is + true + the empty string is used as the path .
def view(path, template)
          path = path == true ? "" : "/#{path}"
          @roda.hash_path(@namespace, path) do |r|
            r.get do
              view(template)
            end
          end
        end
def view ( path , template ) path = path == true ? "" : "/#{path}" @roda . hash_path ( @namespace , path ) do | r | r . get do view ( template ) end end end
Use the segment to setup a path in the current namespace that
will render the view with the given name if the GET method is
used, and will return a 404 if another request method is used.
Use the segment to setup a path in the current namespace that will render the view with the given name if the GET method is used and will return a 404 if another request method is used .
path
template