Module: ActionParamsContract::DryExtensions::RulePrepend
- Defined in:
- lib/action_params_contract/dry_extensions/rule_prepend.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.apply! ⇒ Object
21 |
# File 'lib/action_params_contract/dry_extensions/rule_prepend.rb', line 21 def self.apply! = Dry::Validation::Rule.prepend(self) |
Instance Method Details
#call(contract, result) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/action_params_contract/dry_extensions/rule_prepend.rb', line 6 def call(contract, result) return super unless ValidationScope.active? Evaluator.new( contract, keys:, macros:, block_options:, result:, values: result.values, _context: result.context, &block ) end |