Class: ValidationManagerResult

Inherits:
Object
  • Object
show all
Defined in:
lib/validation_profiler.rb

Overview

This is used to specify validation results from the #validate method of the ValidationManager

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeValidationManagerResult

Returns a new instance of ValidationManagerResult.



77
78
79
80
# File 'lib/validation_profiler.rb', line 77

def initialize
  @errors = []
  @outcome = true
end

Instance Attribute Details

#errorsArray[{:field, :error_message}]

Returns An array of field errors that occurred during validation.

Returns:

  • (Array[{:field, :error_message}])

    An array of field errors that occurred during validation.



75
76
77
# File 'lib/validation_profiler.rb', line 75

def errors
  @errors
end

#outcomeBoolean

Returns The outcome of the validation.

Returns:

  • (Boolean)

    The outcome of the validation.



72
73
74
# File 'lib/validation_profiler.rb', line 72

def outcome
  @outcome
end