Class: ValidationProfiler::ManagerResult

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 Validation Manager

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeManagerResult

Returns a new instance of ManagerResult.



81
82
83
84
# File 'lib/validation_profiler.rb', line 81

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.



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

def errors
  @errors
end

#outcomeBoolean

Returns The outcome of the validation.

Returns:

  • (Boolean)

    The outcome of the validation.



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

def outcome
  @outcome
end