Class: HttpMonkey::Configuration
- Inherits:
-
Object
- Object
- HttpMonkey::Configuration
show all
- Defined in:
- lib/http_monkey/configuration.rb
Defined Under Namespace
Classes: Behaviours, Middlewares
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Configuration.
Instance Method Details
#behaviours(&block) ⇒ Object
25
26
27
28
|
# File 'lib/http_monkey/configuration.rb', line 25
def behaviours(&block)
@behaviours.instance_eval(&block) if block_given?
@behaviours
end
|
#initialize_copy(source) ⇒ Object
14
15
16
17
18
|
# File 'lib/http_monkey/configuration.rb', line 14
def initialize_copy(source)
super
@behaviours = @behaviours.clone
@middlewares = @middlewares.clone
end
|
#middlewares(&block) ⇒ Object
30
31
32
33
|
# File 'lib/http_monkey/configuration.rb', line 30
def middlewares(&block)
@middlewares.instance_eval(&block) if block_given?
@middlewares
end
|
#net_adapter(adapter = nil) ⇒ Object
20
21
22
23
|
# File 'lib/http_monkey/configuration.rb', line 20
def net_adapter(adapter = nil)
@net_adapter = adapter unless adapter.nil?
@net_adapter
end
|
#storage(store = nil) ⇒ Object
35
36
37
38
|
# File 'lib/http_monkey/configuration.rb', line 35
def storage(store = nil)
@storage = store unless store.nil?
@storage
end
|