Class: DataMapper::Validate::ContextualValidators

Class | DataMapper::Validate::ContextualValidators
In: | lib/dm-validations/contextual_validators.rb
Parent: | Object

@author Guy van den Berg @since 0.9

### Methods

clear! context dump execute inspect new

### Included Modules

Enumerable

### Attributes

contexts | [R] |

### Public Class methods

new()

### Public Instance methods

clear!()

Clear all named context validators off of the resource

context(name)

Return an array of validators for a named context

@param [String]

      Context name for which return validators

@return [Array<DataMapper::Validate::GenericValidator>]

      An array of validators

dump()

API

execute(named_context, target)

Execute all validators in the named context against the target

@param [Symbol]

      named_context the context we are validating against

@param [Object]

      target        the resource that we are validating

@return [Boolean]

      true if all are valid, otherwise false

inspect()

Alias for dump

[Validate]