Module: ConvenientService::Service::Plugins::HasJSendResultParamsValidations::UsingDryValidation::Concern Private
- Defined in:
- lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/concern.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .contract(&block) ⇒ Class<Dry::Validation::Contract> private
- .with(skip_validations: false) ⇒ Module private
Methods included from Core::Entities::Config::Entities::Concerns::Usual
Class Method Details
.contract(&block) ⇒ Class<Dry::Validation::Contract>
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.
Note:
nil is returned when skip_validations option detail is true.
35 36 37 38 |
# File 'lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/concern.rb', line 35 def contract(&block) (@contract ||= ::Class.new(::Dry::Validation::Contract)) .tap { |contract| contract.class_exec(&block) if block } end |
.with(skip_validations: false) ⇒ Module
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.
21 22 23 24 25 |
# File 'lib/convenient_service/service/plugins/has_j_send_result_params_validations/using_dry_validation/concern.rb', line 21 def with(skip_validations: false) return self unless skip_validations Plugins::HasJSendResultParamsValidations::UsingDryValidation::NoOpConcern end |