Class: GdsDataValidation
- Inherits:
-
Object
- Object
- GdsDataValidation
- Defined in:
- lib/gds-data-validation/version.rb,
lib/gds-data-validation.rb,
lib/gds-data-validation/validation_generator.rb
Overview
version.rb
Defined Under Namespace
Classes: ValidationCheckerGenerator
Constant Summary collapse
- VERSION =
'0.1.0'.freeze
Class Method Summary collapse
-
.create(schema_definition) ⇒ Class
create an data validation class which is checking incoming data against a specified schema definition.
-
.create_from_file(file_name) ⇒ Class
create an data validation class which is checking incoming data against a specified schema definition stored in a file.
Class Method Details
.create(schema_definition) ⇒ Class
create an data validation class which is checking incoming data against a specified schema definition
28 29 30 31 |
# File 'lib/gds-data-validation.rb', line 28 def create( schema_definition ) vcg = ValidationCheckerGenerator.new vcg.generate( LDLgeneratedLanguage::Language_gds_check.parse( schema_definition ) ) end |
.create_from_file(file_name) ⇒ Class
create an data validation class which is checking incoming data against a specified schema definition stored in a file
38 39 40 41 |
# File 'lib/gds-data-validation.rb', line 38 def create_from_file( file_name ) vcg = ValidationCheckerGenerator.new vcg.generate( LDLgeneratedLanguage::Language_gds_check.parse( File.read( file_name ) ) ) end |