Module: Veto::Validator::ClassMethods

Defined in:
lib/veto/validator.rb

Instance Method Summary collapse

Instance Method Details

#check_with(val) ⇒ Object



20
21
22
# File 'lib/veto/validator.rb', line 20

def check_with(val)
  @checker = val
end

#checkerObject



24
25
26
# File 'lib/veto/validator.rb', line 24

def checker
  @checker ||= build_checker
end

#validate(*args) ⇒ Object



16
17
18
# File 'lib/veto/validator.rb', line 16

def validate(*args)
  checker.validate(*args)
end

#validates(*args) ⇒ Object



12
13
14
# File 'lib/veto/validator.rb', line 12

def validates(*args)
  checker.validates(*args)
end

#with_options(*args, &block) ⇒ Object



8
9
10
# File 'lib/veto/validator.rb', line 8

def with_options(*args, &block)
  checker.with_options(*args, &block)
end