Class: Deas::ServerData
- Inherits:
-
Object
- Object
- Deas::ServerData
- Defined in:
- lib/deas/server_data.rb
Instance Attribute Summary collapse
-
#error_procs ⇒ Object
readonly
The server uses this to “compile” the common configuration data used by the server instances, error handlers and routes.
-
#logger ⇒ Object
readonly
The server uses this to “compile” the common configuration data used by the server instances, error handlers and routes.
-
#router ⇒ Object
readonly
The server uses this to “compile” the common configuration data used by the server instances, error handlers and routes.
-
#template_source ⇒ Object
readonly
The server uses this to “compile” the common configuration data used by the server instances, error handlers and routes.
Instance Method Summary collapse
- #==(other_server_data) ⇒ Object
-
#initialize(args) ⇒ ServerData
constructor
A new instance of ServerData.
Constructor Details
#initialize(args) ⇒ ServerData
Returns a new instance of ServerData.
12 13 14 15 16 17 18 |
# File 'lib/deas/server_data.rb', line 12 def initialize(args) args ||= {} @error_procs = args[:error_procs] || [] @template_source = args[:template_source] @logger = args[:logger] @router = args[:router] end |
Instance Attribute Details
#error_procs ⇒ Object (readonly)
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.
10 11 12 |
# File 'lib/deas/server_data.rb', line 10 def error_procs @error_procs end |
#logger ⇒ Object (readonly)
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.
10 11 12 |
# File 'lib/deas/server_data.rb', line 10 def logger @logger end |
#router ⇒ Object (readonly)
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.
10 11 12 |
# File 'lib/deas/server_data.rb', line 10 def router @router end |
#template_source ⇒ Object (readonly)
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.
10 11 12 |
# File 'lib/deas/server_data.rb', line 10 def template_source @template_source end |
Instance Method Details
#==(other_server_data) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/deas/server_data.rb', line 20 def ==(other_server_data) if other_server_data.kind_of?(ServerData) self.error_procs == other_server_data.error_procs && self.template_source == other_server_data.template_source && self.logger == other_server_data.logger && self.router == other_server_data.router else super end end |