Module: Pathway::Plugins::DryValidation::V1_0

Defined in:
lib/pathway/plugins/dry_validation/v1_0.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.apply(operation, auto_wire_options: (auto_wire_options_was_not_used=true; false), auto_wire: auto_wire_options) ⇒ Object



74
75
76
77
78
79
80
81
82
83
# File 'lib/pathway/plugins/dry_validation/v1_0.rb', line 74

def self.apply(operation, auto_wire_options: (auto_wire_options_was_not_used=true; false), auto_wire: auto_wire_options)
  #:nocov:
  unless auto_wire_options_was_not_used
    warn "[DEPRECATION] `auto_wire_options` is deprecated. Please use `auto_wire` instead"
  end
  #:nocov:

  operation.auto_wire      = auto_wire
  operation.contract_class = Dry::Validation::Contract
end