Class: RubyWolf::Configuration

Inherits:
BasicObject
Defined in:
lib/ruby_wolf/configuration.rb

Constant Summary collapse

DEFAULT_DAEMON =
false
DEFAULT_HOST =
'0.0.0.0'.freeze
DEFAULT_PORT =
3000
DEFAULT_WORKER =
4

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
11
12
13
14
15
# File 'lib/ruby_wolf/configuration.rb', line 8

def initialize
  @configs = {
    daemon: DEFAULT_DAEMON,
    worker: DEFAULT_WORKER,
    host: DEFAULT_HOST,
    port: DEFAULT_PORT
  }
end

Instance Method Details

#[](key) ⇒ Object



21
22
23
# File 'lib/ruby_wolf/configuration.rb', line 21

def [](key)
  @configs[key]
end

#[]=(key, value) ⇒ Object



17
18
19
# File 'lib/ruby_wolf/configuration.rb', line 17

def []=(key, value)
  @configs[key] = value
end