Module: YaKassa::V3::Concerns::Validatable::ClassMethods

Defined in:
lib/ya_kassa/v3/concerns/validatable.rb

Instance Method Summary collapse

Instance Method Details

#validatable(name, type, params = {}) ⇒ Object



13
14
15
16
17
# File 'lib/ya_kassa/v3/concerns/validatable.rb', line 13

def validatable(name, type, params = {})
  validators = get_validators
  validators << { name: name, type: type, params: params }
  class_variable_set(:@@validators, validators)
end