Class: Glossarist::DatasetValidator
- Inherits:
-
Object
- Object
- Glossarist::DatasetValidator
- Defined in:
- lib/glossarist/dataset_validator.rb
Instance Method Summary collapse
-
#initialize(on_progress: nil) ⇒ DatasetValidator
constructor
A new instance of DatasetValidator.
- #validate(path, strict: false, reference_path: nil) ⇒ Object
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 |