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.1.0"
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
17
18
19
|
# File 'lib/take2.rb', line 17
def config
@configuration ||= Configuration.new
end
|
29
30
31
|
# File 'lib/take2.rb', line 29
def 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
25
26
27
|
# File 'lib/take2.rb', line 25
def local_defaults(options)
configuration.validate_options(options)
end
|
.reset(options = {}) ⇒ Object
21
22
23
|
# File 'lib/take2.rb', line 21
def reset(options = {})
@configuration = Configuration.new(options)
end
|