Class: DhEasy::Qa::ValidateGroups

Inherits:
Object
  • Object
show all
Defined in:
lib/dh_easy/qa/validate_groups.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, scraper_name, collection_name, errors) ⇒ ValidateGroups

Returns a new instance of ValidateGroups.



6
7
8
9
10
11
# File 'lib/dh_easy/qa/validate_groups.rb', line 6

def initialize(data, scraper_name, collection_name, errors)
  @data = data
  @scraper_name = scraper_name
  @collection_name = collection_name
  @errors = errors
end

Instance Attribute Details

#collection_nameObject (readonly)

Returns the value of attribute collection_name.



4
5
6
# File 'lib/dh_easy/qa/validate_groups.rb', line 4

def collection_name
  @collection_name
end

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/dh_easy/qa/validate_groups.rb', line 4

def data
  @data
end

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/dh_easy/qa/validate_groups.rb', line 4

def errors
  @errors
end

#scraper_nameObject (readonly)

Returns the value of attribute scraper_name.



4
5
6
# File 'lib/dh_easy/qa/validate_groups.rb', line 4

def scraper_name
  @scraper_name
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
20
# File 'lib/dh_easy/qa/validate_groups.rb', line 13

def run
  puts "Running Group Validations"
  if group_validations_present?
    load_module
    include_module
    call_validation_methods
  end
end