Class: Sneaql::StepManagers::JSONFileStepManager

Inherits:
Core::StepMetadataManager show all
Defined in:
lib/sneaql_lib/step_manager.rb

Overview

source step metadata from a json file

Instance Attribute Summary

Attributes inherited from Core::StepMetadataManager

#steps

Instance Method Summary collapse

Methods inherited from Core::StepMetadataManager

#initialize

Constructor Details

This class inherits a constructor from Sneaql::Core::StepMetadataManager

Instance Method Details

#manage_stepsObject

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