Module: Swee

Defined in:
lib/swee/helper.rb,
lib/swee/view.rb,
lib/swee/config.rb,
lib/swee/engine.rb,
lib/swee/lodder.rb,
lib/swee/routes.rb,
lib/swee/server.rb,
lib/swee/version.rb,
lib/swee/installer.rb,
lib/swee/connection.rb,
lib/swee/controller.rb,
lib/template/config.rb,
lib/swee/app_executor.rb,
lib/swee/controller_filter.rb,
lib/swee/middlewaves/reloader.rb,
lib/swee/middlewaves/content_length.rb

Overview

require “cgi”

Defined Under Namespace

Modules: ControllerFilter, Helper, Installer, Lodder Classes: AppExecutor, Config, Connection, ContentLength, Controller, Engine, FilterStruct, Reloader, Routes, Server, SweeLogger, View

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.app_config {|self.config.app| ... } ⇒ Object

获取app配置

Yields:



18
19
20
# File 'lib/swee/engine.rb', line 18

def app_config
  yield self.config.app
end

.configObject

配置实例



33
34
35
# File 'lib/swee/engine.rb', line 33

def config
  @@config
end

.database_configObject

获取 数据库配置



28
29
30
# File 'lib/swee/engine.rb', line 28

def database_config

end

.init_configObject

初始化



38
39
40
# File 'lib/swee/engine.rb', line 38

def init_config
  @@config = Config.new
end

.rootObject

获取 app 路径



13
14
15
# File 'lib/swee/engine.rb', line 13

def root
  ENV["app_path"]
end

.server_config {|self.config.server| ... } ⇒ Object

获取 服务器配置

Yields:



23
24
25
# File 'lib/swee/engine.rb', line 23

def server_config
  yield self.config.server
end