Parent

Class/Module Index [+]

Quicksearch

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

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

Public Class Methods

new(receiver ,&block) click to toggle source

Initializes a new generator.

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

Public Instance Methods

method_missing(m, *args, &block) click to toggle source

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

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.