Class: RiderServer::Validate::Base
Class Method Summary
collapse
Instance Method Summary
collapse
#add_predicate, #check_predicates
Class Method Details
.validate(data) ⇒ Object
11
12
13
|
# File 'lib/rider_server/validate/base.rb', line 11
def self.validate(data)
new.validate(data)
end
|
Instance Method Details
#fail(value, loc, reason) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/rider_server/validate/base.rb', line 19
def fail(value, loc, reason)
if loc == ""
raise ValidationError, "#{value.inspect}, #{reason}"
else
raise ValidationError, "#{value.inspect}, found at #{loc} #{reason}"
end
end
|
#validate(data) ⇒ Object
15
16
17
|
# File 'lib/rider_server/validate/base.rb', line 15
def validate(data)
raise NotImplementedError
end
|