Sha256: 43c849c7c89d7bace9b5e46c0e65366d3660cbc2ac34ae78bf9962542bac3146
Contents?: true
Size: 504 Bytes
Versions: 10
Compression:
Stored size: 504 Bytes
Contents
module Grape # Registry to store and locate known Validators. module Validations class << self attr_accessor :validators end self.validators = {} # Register a new validator, so it can be used to validate parameters. # @param short_name [String] all lower-case, no spaces # @param klass [Class] the validator class. Should inherit from # Validations::Base. def self.register_validator(short_name, klass) validators[short_name] = klass end end end
Version data entries
10 entries across 10 versions & 1 rubygems