lib/deas/server_data.rb in deas-0.40.0 vs lib/deas/server_data.rb in deas-0.41.0
- old
+ new
@@ -1,21 +1,21 @@
module Deas
class ServerData
- # The server uses this to "compile" its configuration for speed. NsOptions
- # is relatively slow everytime an option is read. To avoid this, we read the
- # options one time here and memoize their values. This way, we don't pay the
- # NsOptions overhead when reading them while handling a request.
+ # The server uses this to "compile" the common configuration data used
+ # by the server instances, error handlers and routes. The goal here is
+ # to provide these with a simplified interface with the minimal data needed
+ # and to decouple the configuration from each thing that needs its data.
- attr_reader :error_procs, :logger, :router, :template_source
+ attr_reader :error_procs, :template_source, :logger, :router
def initialize(args = nil)
args ||= {}
@error_procs = args[:error_procs] || []
+ @template_source = args[:template_source]
@logger = args[:logger]
@router = args[:router]
- @template_source = args[:template_source]
end
end
end