Class: Aidp::StrategyExecution::StrategyLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/aidp/strategy_execution/strategy_loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(project_dir: Dir.pwd) ⇒ StrategyLoader

Returns a new instance of StrategyLoader.



10
11
12
# File 'lib/aidp/strategy_execution/strategy_loader.rb', line 10

def initialize(project_dir: Dir.pwd)
  @project_dir = project_dir
end

Instance Method Details

#load_file(path) ⇒ Object



14
15
16
17
# File 'lib/aidp/strategy_execution/strategy_loader.rb', line 14

def load_file(path)
  raw = YAML.safe_load_file(expand_path(path), permitted_classes: [Date, Time, Symbol], aliases: true) || {}
  StrategySpec.from_hash(raw)
end