Class | Sequel::Plugins::ValidationClassMethods::ClassMethods::Generator
In: | lib/sequel/plugins/validation_class_methods.rb
Parent: | Object

The Generator class is used to generate validation definitions using the validates {} idiom.

### Methods

method_missing new

### Public Class methods

new(receiver ,&block)

Initializes a new generator.

[Source]

        # File lib/sequel/plugins/validation_class_methods.rb, line 45
    45:           def initialize(receiver ,&block)
    46:             @receiver = receiver
    47:             instance_eval(&block)
    48:           end

### Public Instance methods

method_missing(m, *args, &block)

Delegates method calls to the receiver by calling receiver.validates_xxx.

[Source]

        # File lib/sequel/plugins/validation_class_methods.rb, line 51
    51:           def method_missing(m, *args, &block)
    52:             @receiver.send("validates_#{m}""validates_#{m}", *args, &block)
    53:           end

[Validate]