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

@author Guy van den Berg @since 0.9

Methods

clear!   context   execute   new  

Included Modules

Enumerable

Attributes

contexts  [R] 

Public Class methods

Public Instance methods

Clear all named context validators off of the resource

Return an array of validators for a named context

@param [String]

  Context name for which return validators

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

  An array of validators

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

[Validate]