lib/hara/base.rb in hara-0.0.2 vs lib/hara/base.rb in hara-0.1.0
- old
+ new
@@ -1,15 +1,24 @@
require "hara/version"
require 'hara/app'
-require 'hara/server'
module Hara
class << self
def env
@_env ||= (ENV['APP_ENV'] || :development).to_sym
end
def env= env
@_env = env
end
+
+ def request_handler &blk
+ if blk
+ @_request_handler = blk
+ else
+ @_request_handler
+ end
+ end
end
end
+
+require 'hara/server'