class DhEasy::Qa::ValidateInternal
Attributes
collections[R]
outputs[R]
rules[R]
scraper_name[R]
Public Class Methods
new(vars, config, outputs)
click to toggle source
# File lib/dh_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 end
Public Instance Methods
run()
click to toggle source
# File lib/dh_easy/qa/validate_internal.rb, line 13 def run begin ValidateScraper.new(scraper_name, collections, rules, outputs, thresholds).run rescue StandardError => e puts "An error has occurred: #{e}" return nil end end
Private Instance Methods
thresholds()
click to toggle source
thresholds are a setting where you can suppress errors if they are under a specific error rate
# File lib/dh_easy/qa/validate_internal.rb, line 25 def thresholds @thresholds ||= begin file_path = File.expand_path('thresholds.yaml', Dir.pwd) if File.exists? file_path YAML.load(File.open(file_path)) else nil end end end