Module: Take2
- Defined in:
- lib/take2.rb,
lib/take2/backoff.rb,
lib/take2/version.rb,
lib/take2/configuration.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: Backoff, Configuration
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
15
16
17
|
# File 'lib/take2.rb', line 15
def configuration
@configuration
end
|
Class Method Details
.config ⇒ Object
18
19
20
|
# File 'lib/take2.rb', line 18
def self.config
@configuration ||= Configuration.new
end
|
30
31
32
|
# File 'lib/take2.rb', line 30
def self.configure
yield(config) if block_given?
end
|
.included(base) ⇒ Object
8
9
10
11
12
|
# File 'lib/take2.rb', line 8
def self.included(base)
base.extend(ClassMethods)
base.send(:set_defaults)
base.send(:include, InstanceMethods)
end
|
.local_defaults(options) ⇒ Object
26
27
28
|
# File 'lib/take2.rb', line 26
def self.local_defaults(options)
configuration.validate_options(options)
end
|
.reset(options = {}) ⇒ Object
22
23
24
|
# File 'lib/take2.rb', line 22
def self.reset(options = {})
@configuration = Configuration.new(options)
end
|