Class: Validation::Generator

### Home Classes Methods

### In Files

- lib/assistance/validation.rb

### Parent

Object

### Methods

- ::new
- #method_missing

### Files

- CHANGELOG
- COPYING
- README

### Class/Module Index

Quicksearch

- Validation
- Validation::ClassMethods
- Validation::Errors
- Validation::Generator
- Assistance
- Assistance::TimeCalculations
- Inflector
- Inflector::Inflections
- Array
- ConnectionPool
- FalseClass
- NilClass
- Numeric
- Object
- SingleThreadedPool
- String
- TrueClass

No matching classes.

# Validation::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/assistance/validation.rb, line 80
    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/assistance/validation.rb, line 86
    def method_missing(m, *args, &block)
      @receiver.send(:"validates_#{m}", *args, &block)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.