Module: Slanger::Config
- Extended by:
- Config
- Included in:
- Config
- Defined in:
- lib/slanger/config.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
27
28
29
|
# File 'lib/slanger/config.rb', line 27
def method_missing(meth, *args, &blk)
options[meth]
end
|
Instance Method Details
#[](key) ⇒ Object
9
10
11
|
# File 'lib/slanger/config.rb', line 9
def [](key)
options[key]
end
|
#load(opts = {}) ⇒ Object
5
6
7
|
# File 'lib/slanger/config.rb', line 5
def load(opts = {})
options.update opts
end
|
#options ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/slanger/config.rb', line 13
def options
@options ||= {
api_host: "0.0.0.0",
api_port: "4567",
websocket_host: "0.0.0.0",
websocket_port: "8080",
debug: false,
redis_address: "redis://0.0.0.0:6379/0",
socket_handler: Slanger::Handler,
require: [],
activity_timeout: 120,
}
end
|