Module: Kangaru::Validators

Defined in:
lib/kangaru/validators.rb,
lib/kangaru/validators/required_validator.rb

Defined Under Namespace

Classes: RequiredValidator

Class Method Summary collapse

Class Method Details

.get(name) ⇒ Object



5
6
7
8
9
10
# File 'lib/kangaru/validators.rb', line 5

def self.get(name)
  class_name = name.to_s.to_class_name(suffix: :validator)

  from_kangaru(class_name) || from_application(class_name) ||
    raise("#{class_name} is not defined")
end