Class: Sbmt::Strangler::Configuration

Inherits:
Object
  • Object
show all
Extended by:
Configurable
Defined in:
lib/sbmt/strangler/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configurable

option

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(options = {})
  @controllers = []
  @http = ActiveSupport::InheritableOptions.new(Sbmt::Strangler::Http::DEFAULT_HTTP_OPTIONS)
end

Instance Attribute Details

#controllersObject (readonly)

Returns the value of attribute controllers.



13
14
15
# File 'lib/sbmt/strangler/configuration.rb', line 13

def controllers
  @controllers
end

#httpObject (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