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
-
#adapter ⇒ Symbol
the adapter to use, defaults to :WEBrick.
-
#adapter_options ⇒ Hash
adapter-specific options, defaults to {}.
-
#ip ⇒ String
the interface to bind to, defaults to “0.0.0.0” (all interfaces).
-
#port ⇒ Fixnum
the port to bind to, defaults to 8080.
Class Method Summary collapse
-
.default ⇒ Configuration
The default configuration.
Instance Attribute Details
#adapter ⇒ Symbol
the adapter to use, defaults to :WEBrick
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def adapter @adapter end |
#adapter_options ⇒ Hash
adapter-specific options, defaults to {}
11 12 13 |
# File 'lib/webmachine/configuration.rb', line 11 def @adapter_options end |
#ip ⇒ String
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 |
#port ⇒ Fixnum
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
.default ⇒ Configuration
Returns the default configuration.
14 15 16 |
# File 'lib/webmachine/configuration.rb', line 14 def Configuration.default new("0.0.0.0", 8080, :WEBrick, {}) end |