2007-07-12
第一部分:核心引擎
核心引擎负责处理所有的数据和状态逻辑,此核心可以完全独立于Rails框架而自成体系。
主引擎:
ruby 代码
- #2007-5-30 wiwolf@126.com
- # Homepage http://eve.woygo.com
- # Support http://rails.woygo.com
- #Copyright (c) 2007 Ye Tian
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- #This is base for engine.
- require File.join(File.dirname(__FILE__),'logger')
- require File.join(File.dirname(__FILE__),'online')
- require File.join(File.dirname(__FILE__),'eve')
- class Eden
- #Include log module
- include EdenLogger
- #Include onlie module
- include OnlineModule
- #Include eve module
- include Eve
- #initialize
- private_class_method :new
- @@eden = nil
- def Eden.create
- @@eden = new unless @@eden
- @@eden
- end
- def initialize
- engine_config = YAML.load_file('lib/eden/config/config.yml')
- #initialize logger
- init_logger_module engine_config['logger_file'],engine_config['logger_file_dir'],engine_config['logger_level']
- #initialize eve
- init_eve_module
- #start maintenance thread
- init_online_module
- @logger.info 'Eden was initialized.'
- end
- end
- 19:17
- 浏览 (325)
- 评论 (0)
- 分类: Rails开发EVE及时通讯系统
- 相关推荐
发表评论
- 浏览: 6432 次

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
一个Spring 2.5 版本的Sp ...
java.lang.ClassNotFoundException: org.sp ...
-- by wiwolf -
一个Spring 2.5 版本的Sp ...
我运行了您写的程序,我在myeclipse6.0中运行报错008-2-19 10 ...
-- by laserdance -
开源发布EVE即时通讯系统
EVE即时通讯系统? 没看明白,呵呵
-- by bubble -
ROR的AJAX心得
楼主做的吗? CSS布局好像不大好哦。 FF中看看新闻页面:)
-- by bencode -
发布即时通讯系统的所有代 ...
干什么用的?
-- by macoo






评论排行榜