Module: Dry::Validation::Deprecations
- Extended by:
- Configurable
- Included in:
- Schema::DSL, Schema::Rule
- Defined in:
- lib/dry/validation/deprecations.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.format(msg, caller) ⇒ Object
11 12 13 |
# File 'lib/dry/validation/deprecations.rb', line 11 def self.format(msg, caller) "#{msg} [#{caller[1].split(':')[0..1].join(' line ')}]" end |
Instance Method Details
#logger ⇒ Object
15 16 17 |
# File 'lib/dry/validation/deprecations.rb', line 15 def logger @logger ||= Deprecations.config.logger end |
#warn(msg) ⇒ Object
19 20 21 |
# File 'lib/dry/validation/deprecations.rb', line 19 def warn(msg) logger.warn(Deprecations.format(msg, ::Kernel.caller)) end |