Class: ValidationProfiler::ManagerResult

Inherits:
Object
  • Object
show all
Defined in:
lib/validation_profiler/manager_result.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.



12
13
14
15
# File 'lib/validation_profiler/manager_result.rb', line 12

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.



10
11
12
# File 'lib/validation_profiler/manager_result.rb', line 10

def errors
  @errors
end

#outcomeBoolean

Returns The outcome of the validation.

Returns:

  • (Boolean)

    The outcome of the validation.



7
8
9
# File 'lib/validation_profiler/manager_result.rb', line 7

def outcome
  @outcome
end