Class: Sbmt::Strangler::Configuration
- Inherits:
-
Object
- Object
- Sbmt::Strangler::Configuration
- Extended by:
- Configurable
- Defined in:
- lib/sbmt/strangler/configuration.rb
Instance Attribute Summary collapse
-
#controllers ⇒ Object
readonly
Returns the value of attribute controllers.
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Instance Method Summary collapse
- #controller(name) ⇒ Object
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Methods included from Configurable
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 |
# File 'lib/sbmt/strangler/configuration.rb', line 15 def initialize( = {}) @controllers = [] @http = ActiveSupport::InheritableOptions.new(Sbmt::Strangler::Http::DEFAULT_HTTP_OPTIONS) end |
Instance Attribute Details
#controllers ⇒ Object (readonly)
Returns the value of attribute controllers.
13 14 15 |
# File 'lib/sbmt/strangler/configuration.rb', line 13 def controllers @controllers end |
#http ⇒ Object (readonly)
Returns the value of attribute http.
13 14 15 |
# File 'lib/sbmt/strangler/configuration.rb', line 13 def http @http end |
Instance Method Details
#controller(name) ⇒ Object
20 21 22 |
# File 'lib/sbmt/strangler/configuration.rb', line 20 def controller(name, &) controllers.push(Sbmt::Strangler::Controller.new(name, self, &)) end |