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 }.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.
11 12 13 |
# File 'lib/plum/rack/config.rb', line 11 def initialize(config = {}) @config = DEFAULT_CONFIG.merge(config) end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/plum/rack/config.rb', line 15 def [](key) @config[key] end |
#[]=(key, value) ⇒ Object
19 20 21 |
# File 'lib/plum/rack/config.rb', line 19 def []=(key, value) @config[key] = value end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/plum/rack/config.rb', line 23 def to_s @config.to_s end |