Class: AeEasy::Qa::SaveOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/ae_easy/qa/save_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(total_items, rules, errors, collection_name, outputs, options) ⇒ SaveOutput

Returns a new instance of SaveOutput.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ae_easy/qa/save_output.rb', line 8

def initialize(total_items, rules, errors, collection_name, outputs, options)
  @total_items = total_items
  @rules = rules
  @errors = errors
  @collection_name = collection_name
  @outputs = outputs
  @options = options
  @summary = Hash.new(0)
  @error_totals = {}
  @fields_to_ignore = []
  @specific_validations_to_ignore = []
end

Instance Attribute Details

#collection_nameObject (readonly)

Returns the value of attribute collection_name.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def collection_name
  @collection_name
end

#error_totalsObject (readonly)

Returns the value of attribute error_totals.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def error_totals
  @error_totals
end

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def errors
  @errors
end

#fields_to_ignoreObject (readonly)

Returns the value of attribute fields_to_ignore.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def fields_to_ignore
  @fields_to_ignore
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def options
  @options
end

#outputsObject (readonly)

Returns the value of attribute outputs.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def outputs
  @outputs
end

#rulesObject (readonly)

Returns the value of attribute rules.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def rules
  @rules
end

#specific_validations_to_ignoreObject (readonly)

Returns the value of attribute specific_validations_to_ignore.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def specific_validations_to_ignore
  @specific_validations_to_ignore
end

#summaryObject (readonly)

Returns the value of attribute summary.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def summary
  @summary
end

#total_itemsObject (readonly)

Returns the value of attribute total_items.



4
5
6
# File 'lib/ae_easy/qa/save_output.rb', line 4

def total_items
  @total_items
end

Instance Method Details

#runObject



21
22
23
24
25
26
27
# File 'lib/ae_easy/qa/save_output.rb', line 21

def run
  gather_threshold_totals
  gather_validations_to_ignore
  save_group_errors
  save_errors
  save_summary
end