Class: Glossarist::DatasetValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/glossarist/dataset_validator.rb

Instance Method Summary collapse

Constructor Details

#initialize(on_progress: nil) ⇒ DatasetValidator

Returns a new instance of DatasetValidator.



5
6
7
# File 'lib/glossarist/dataset_validator.rb', line 5

def initialize(on_progress: nil)
  @on_progress = on_progress
end

Instance Method Details

#validate(path, strict: false, reference_path: nil) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/glossarist/dataset_validator.rb', line 9

def validate(path, strict: false, reference_path: nil)
  if File.extname(path).downcase == ".gcr"
    validate_gcr(path, reference_path: reference_path)
  else
    validate_directory(path, reference_path: reference_path)
  end
end