Class: Proteus::Validators::BaseValidator
- Inherits:
-
Object
- Object
- Proteus::Validators::BaseValidator
- Includes:
- ValidationDSL, ValidationHelpers
- Defined in:
- lib/proteus/validators/base_validator.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(data, environment = nil) ⇒ BaseValidator
constructor
A new instance of BaseValidator.
Methods included from ValidationHelpers
Methods included from ValidationDSL
#collect, #current_data, #each, #each_key, #ensure_data_type, #ensure_keys, #ensure_presence, #ensure_unique_values, #ensure_uniqueness_across, #ensure_value, #in_case, #init, #peek, #transform_to_paths, #within
Constructor Details
#initialize(data, environment = nil) ⇒ BaseValidator
Returns a new instance of BaseValidator.
11 12 13 14 15 |
# File 'lib/proteus/validators/base_validator.rb', line 11 def initialize(data, environment = nil) @data = data @environment = environment validate end |