Class: Sequel::Model::Validation::Generator

Class | Sequel::Model::Validation::Generator
In: | lib/sequel_model/validations.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_model/validations.rb, line 47
    47:         def initialize(receiver ,&block)
    48:           @receiver = receiver
    49:           instance_eval(&block)
    50:         end

### Public Instance methods

method_missing(m, *args, &block)

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

[Source]

        # File lib/sequel_model/validations.rb, line 53
    53:         def method_missing(m, *args, &block)
    54:           @receiver.send("validates_#{m}""validates_#{m}", *args, &block)
    55:         end

[Validate]