Module: Pad
- Defined in:
- lib/pad.rb,
lib/pad/entity.rb,
lib/pad/virtus.rb,
lib/pad/version.rb,
lib/pad/configuration.rb,
lib/pad/services/logger.rb
Defined Under Namespace
Modules: Entity, Services, Virtus
Classes: Configuration
Class Method Summary
collapse
Class Method Details
.build(method, options, &block) ⇒ Object
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
30
31
32
33
|
# File 'lib/pad.rb', line 30
def build(method, options, &block)
options = options.dup
builder(options).public_send(method, options, &block)
end
|
.builder(options) ⇒ Object
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
36
37
38
|
# File 'lib/pad.rb', line 36
def builder(options)
options.delete(:builder) || configuration.builder
end
|
.config {|configuration| ... } ⇒ Object
20
21
22
23
|
# File 'lib/pad.rb', line 20
def config
yield configuration if block_given?
configuration
end
|
.configuration ⇒ Object
This method is part of a private API.
You should avoid using this method if possible, as it may be removed or be changed in the future.
41
42
43
|
# File 'lib/pad.rb', line 41
def configuration
@configuration ||= Configuration.new
end
|
.reset ⇒ Object
25
26
27
|
# File 'lib/pad.rb', line 25
def reset
@configuration = Configuration.new
end
|