Class: Sneaql::StepManagers::JSONFileStepManager
- Inherits:
-
Core::StepMetadataManager
- Object
- Core::StepMetadataManager
- Sneaql::StepManagers::JSONFileStepManager
- Defined in:
- lib/sneaql_lib/step_manager.rb
Overview
source step metadata from a json file
Instance Attribute Summary
Attributes inherited from Core::StepMetadataManager
Instance Method Summary collapse
-
#manage_steps ⇒ Object
Manages steps from a local JSON file.
Methods inherited from Core::StepMetadataManager
Constructor Details
This class inherits a constructor from Sneaql::Core::StepMetadataManager
Instance Method Details
#manage_steps ⇒ Object
Manages steps from a local JSON file.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/sneaql_lib/step_manager.rb', line 15 def manage_steps @steps = JSON.parse( File.read(@params[:step_metadata_file_path]) ).sort_by! { |h| h['step_number'] } @steps.map! do |j| { step_number: j['step_number'], step_file: j['step_file'] } end end |