class Sequel::ConstraintValidations::Generator
This is the DSL class used for the validate block inside create_table and alter_table.
Public Class Methods
new(generator)
click to toggle source
Store the schema generator that encloses this validates block.
# File lib/sequel/extensions/constraint_validations.rb, line 141 def initialize(generator) @generator = generator end
Public Instance Methods
drop(constraint)
click to toggle source
Given the name of a constraint, drop that constraint from the database, and remove the related validation metadata.
# File lib/sequel/extensions/constraint_validations.rb, line 165 def drop(constraint) @generator.validation({:type=>:drop, :name=>constraint}) end
process(&block)
click to toggle source
Alias of instance_eval for a nicer API.
# File lib/sequel/extensions/constraint_validations.rb, line 170 def process(&block) instance_eval(&block) end