Class: Suma::SchemaManifestGenerator
- Inherits:
-
Object
- Object
- Suma::SchemaManifestGenerator
- Defined in:
- lib/suma/schema_manifest_generator.rb
Constant Summary collapse
- YAML_FILE_EXTENSIONS =
[".yaml", ".yml"].freeze
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(metanorma_manifest_file, schema_manifest_file, exclude_paths: nil) ⇒ SchemaManifestGenerator
constructor
A new instance of SchemaManifestGenerator.
Constructor Details
#initialize(metanorma_manifest_file, schema_manifest_file, exclude_paths: nil) ⇒ SchemaManifestGenerator
Returns a new instance of SchemaManifestGenerator.
11 12 13 14 15 |
# File 'lib/suma/schema_manifest_generator.rb', line 11 def initialize(, schema_manifest_file, exclude_paths: nil) @metanorma_manifest_file = File.() @schema_manifest_file = schema_manifest_file @exclude_paths = exclude_paths end |
Instance Method Details
#generate ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/suma/schema_manifest_generator.rb', line 17 def generate validate_inputs = load_yaml(@metanorma_manifest_file) collection_files = ["metanorma"]["source"]["files"] manifest_files = load_manifest_files(collection_files) all_schemas = load_project_schemas(manifest_files) all_schemas["schemas"] = all_schemas["schemas"].sort.to_h write_output(all_schemas) end |