Class: Swee::Config

Inherits:
Object show all
Defined in:
lib/swee/config.rb

Defined Under Namespace

Classes: AppConfig, AppPluginConfig, BaseConfig, DbConfig, ServerConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



108
109
110
111
112
113
# File 'lib/swee/config.rb', line 108

def initialize
  @server = ServerConfig.new
  @app    = AppConfig.new
  @db     = DbConfig.new
  # @plugin = AppPluginConfig.new
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



107
108
109
# File 'lib/swee/config.rb', line 107

def app
  @app
end

#app_pluginObject

Returns the value of attribute app_plugin.



107
108
109
# File 'lib/swee/config.rb', line 107

def app_plugin
  @app_plugin
end

#dbObject

Returns the value of attribute db.



107
108
109
# File 'lib/swee/config.rb', line 107

def db
  @db
end

#serverObject

Returns the value of attribute server.



107
108
109
# File 'lib/swee/config.rb', line 107

def server
  @server
end

Instance Method Details

#default_config!(options) ⇒ Object



115
116
117
# File 'lib/swee/config.rb', line 115

def default_config! options
  [@server,@app,@db].each { |cfg| cfg.default_config! options }
end