From 7d07c36f1da30af054d78deed5e87f29832d6f6b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 7 Nov 2009 20:09:50 -0800 Subject: ev_core: cleanup handling of APP constant It'll make development of future ev_core-derived things easier, hopefully. --- lib/rainbows/ev_core.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index 244e726..017fe5c 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -8,6 +8,10 @@ module Rainbows include Rainbows::Const G = Rainbows::G + def self.setup(klass) + klass.const_set(:APP, G.server.app) + end + def post_init @remote_addr = ::TCPSocket === @_io ? @_io.peeraddr.last : LOCALHOST @env = {} -- cgit v1.2.3-24-ge0c7