Class: Sequel::Plugins::ValidationClassMethods::ClassMethods::Generator

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 28
    28:           def initialize(receiver ,&block)
    29:             @receiver = receiver
    30:             instance_eval(&block)
    31:           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 34
    34:           def method_missing(m, *args, &block)
    35:             @receiver.send("validates_#{m}""validates_#{m}", *args, &block)
    36:           end

[Validate]