Class: Plum::Rack::Config
- Inherits:
-
Object
- Object
- Plum::Rack::Config
- Defined in:
- lib/plum/rack/config.rb
Constant Summary collapse
- DEFAULT_CONFIG =
{ listeners: [], debug: false, log: nil, # $stdout server_push: true, threadpool_size: 1, }.freeze
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(config = {}) ⇒ Config
constructor
A new instance of Config.
- #to_s ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ Config
Returns a new instance of Config.
13 14 15 |
# File 'lib/plum/rack/config.rb', line 13 def initialize(config = {}) @config = DEFAULT_CONFIG.merge(config) end |
Instance Method Details
#[](key) ⇒ Object
17 18 19 |
# File 'lib/plum/rack/config.rb', line 17 def [](key) @config[key] end |
#[]=(key, value) ⇒ Object
21 22 23 |
# File 'lib/plum/rack/config.rb', line 21 def []=(key, value) @config[key] = value end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/plum/rack/config.rb', line 25 def to_s @config.to_s end |