Method: Cuprum::ParameterValidation::ValidationRule#initialize
- Defined in:
- lib/cuprum/parameter_validation/validation_rule.rb
#initialize(name:, type:, method_name: nil, **options, &block) ⇒ ValidationRule
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.
Returns a new instance of ValidationRule.
28 29 30 31 32 33 34 35 36 |
# File 'lib/cuprum/parameter_validation/validation_rule.rb', line 28 def initialize(name:, type:, method_name: nil, **, &block) super( block:, method_name: method_name&.to_sym || method_name_for(name:, type:), name: name.to_sym, options:, type: type.to_sym ) end |