<NME> mini.rb
<BEF> # encoding: utf-8

require "rango/mixins/render"
require "rango/rack/request"

# run app { |request, response|
# if request.env["PATH_INFO"].match(/^\/admin/)
#   redirect ""
# else
#   render "index"
# end
# }
module Rango
  module Mini
    include Rango::RenderMixin
        request = Rango::Request.new(env)
        response = Rack::Response.new
        body = block.call(request, response)
        # TODO: check how rack test if object is stringable, probably not this way
        raise ArgumentError, "It has to return a valid rack body, #{body.inspect} returned" unless body.respond_to?(:each) || body.is_a?(String)
        response.write(body)
        array = response.finish
        [array[0], array[1], body] # we don't want to have Rack::Response instance instead body, it's mess!
      end
    end
  end
end

<MSG> More docs for Rango::Mini

<DFF> @@ -1,15 +1,12 @@
 # encoding: utf-8
 
+# Rango::Mini is the most low-level part which can render
+# templates standalone. More low-level is only the RenderMixin.
+# See http://wiki.github.com/botanicus/rango/template-rendering
+
 require "rango/mixins/render"
 require "rango/rack/request"
 
-# run app { |request, response|
-# if request.env["PATH_INFO"].match(/^\/admin/)
-#   redirect ""
-# else
-#   render "index"
-# end
-# }
 module Rango
   module Mini
     include Rango::RenderMixin

More docs for Rango::Mini