Class: Webmachine::Configuration
- Inherits:
-
Struct
- Object
- Struct
- Webmachine::Configuration
- Defined in:
- lib/webmachine/configuration.rb
Overview
A simple configuration container for items that are used across multiple web server adapters. Typically set using configure. If not set by your application, the defaults will be filled in when run is called.
Instance Attribute Summary (collapse)
-
- (Symbol) adapter
the adapter to use, defaults to :WEBrick.
-
- (Hash) adapter_options
adapter-specific options, defaults to {}.
-
- (String) ip
the interface to bind to, defaults to “0.0.0.0” (all interfaces).
-
- (Fixnum) port
the port to bind to, defaults to 8080.
Class Method Summary (collapse)
-
+ (Configuration) default
The default configuration.
Instance Attribute Details
- (Symbol) adapter
the adapter to use, defaults to :WEBrick
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def adapter @adapter end |
- (Hash) adapter_options
adapter-specific options, defaults to {}
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def @adapter_options end |
- (String) ip
the interface to bind to, defaults to “0.0.0.0” (all interfaces)
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def ip @ip end |
- (Fixnum) port
the port to bind to, defaults to 8080
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def port @port end |
Class Method Details
+ (Configuration) default
The default configuration
14 15 16 |
# File 'lib/webmachine/configuration.rb', line 14 def Configuration.default new("0.0.0.0", 8080, :WEBrick, {}) end |