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.



79
80
81
82
# File 'lib/validation_profiler.rb', line 79

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.



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

def errors
  @errors
end

#outcomeBoolean

Returns The outcome of the validation.

Returns:

  • (Boolean)

    The outcome of the validation.



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

def outcome
  @outcome
end