0
0
zero/lib/zero/controller.rb
2012-10-05 07:54:17 +02:00

14 lines
372 B
Ruby

module Zero
# abstract class to make creation of controllers easier
#
# This abstract class creates an interface to make it easier to write
# rack compatible controllers. It catches #call and creates a new instance
# with the environment and calls #render on it.
class Controller
def self << call(env)
new(Request.new(env)).render
end
end
end