Class: AeEasy::Qa::ValidateInternal
- Inherits:
-
Object
- Object
- AeEasy::Qa::ValidateInternal
- Defined in:
- lib/ae_easy/qa/validate_internal.rb
Instance Attribute Summary collapse
-
#collections ⇒ Object
readonly
Returns the value of attribute collections.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#outputs ⇒ Object
readonly
Returns the value of attribute outputs.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#scraper_name ⇒ Object
readonly
Returns the value of attribute scraper_name.
Instance Method Summary collapse
-
#initialize(vars, config, outputs) ⇒ ValidateInternal
constructor
A new instance of ValidateInternal.
- #run ⇒ Object
Constructor Details
#initialize(vars, config, outputs) ⇒ ValidateInternal
Returns a new instance of ValidateInternal.
6 7 8 9 10 11 12 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 6 def initialize(vars, config, outputs) @scraper_name = vars['scraper_name'] @collections = vars['collections'] @rules = config['individual_validations'] @outputs = outputs @data = vars['data'] end |
Instance Attribute Details
#collections ⇒ Object (readonly)
Returns the value of attribute collections.
4 5 6 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 4 def collections @collections end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 4 def data @data end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
4 5 6 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 4 def outputs @outputs end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
4 5 6 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 4 def rules @rules end |
#scraper_name ⇒ Object (readonly)
Returns the value of attribute scraper_name.
4 5 6 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 4 def scraper_name @scraper_name end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/ae_easy/qa/validate_internal.rb', line 14 def run begin ValidateScraper.new(scraper_name, collections, rules, outputs, thresholds, data).run rescue StandardError => e puts "An error has occurred: #{e}" return nil end end |