Module: Sequel::Plugins::ConstraintValidations::ClassMethods

Defined in:
lib/sequel/plugins/constraint_validations.rb

Instance Attribute Summary collapse

Instance Attribute Details

#constraint_validation_reflectionsObject (readonly)

A hash of reflections of constraint validations. Keys are type name symbols. Each value is an array of pairs, with the first element being the validation type symbol (e.g. :presence) and the second element being options for the validation. If the validation takes an argument, it appears as the :argument entry in the validation option hash.



86
87
88
# File 'lib/sequel/plugins/constraint_validations.rb', line 86

def constraint_validation_reflections
  @constraint_validation_reflections
end

#constraint_validationsObject (readonly)

An array of validation method call arrays. Each array is an array that is splatted to send to perform a validation via validation_helpers.



79
80
81
# File 'lib/sequel/plugins/constraint_validations.rb', line 79

def constraint_validations
  @constraint_validations
end

#constraint_validations_tableObject (readonly)

The name of the table containing the constraint validations metadata.



89
90
91
# File 'lib/sequel/plugins/constraint_validations.rb', line 89

def constraint_validations_table
  @constraint_validations_table
end