Method: CurationConcerns::Workflow::WorkflowImporter.generate_from_json_file
- Defined in:
- app/services/curation_concerns/workflow/workflow_importer.rb
.generate_from_json_file(path:, **keywords) ⇒ Array<Sipity::Workflow>
Responsible for generating the work type and corresponding processing entries based on given pathname or JSON document.
21 22 23 24 25 |
# File 'app/services/curation_concerns/workflow/workflow_importer.rb', line 21 def self.generate_from_json_file(path:, **keywords) contents = path.respond_to?(:read) ? path.read : File.read(path) data = JSON.parse(contents) new(data: data, **keywords).call end |