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.
16 17 18 19 |
# File 'lib/sbmt/strangler/configuration.rb', line 16 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.
14 15 16 |
# File 'lib/sbmt/strangler/configuration.rb', line 14 def controllers @controllers end |
#http ⇒ Object (readonly)
Returns the value of attribute http.
14 15 16 |
# File 'lib/sbmt/strangler/configuration.rb', line 14 def http @http end |
Instance Method Details
#controller(name) ⇒ Object
21 22 23 |
# File 'lib/sbmt/strangler/configuration.rb', line 21 def controller(name, &) controllers.push(Sbmt::Strangler::Controller.new(name, self, &)) end |