Class: Aidp::StrategyExecution::StrategyLoader
- Inherits:
-
Object
- Object
- Aidp::StrategyExecution::StrategyLoader
- Defined in:
- lib/aidp/strategy_execution/strategy_loader.rb
Instance Method Summary collapse
-
#initialize(project_dir: Dir.pwd) ⇒ StrategyLoader
constructor
A new instance of StrategyLoader.
- #load_file(path) ⇒ Object
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((path), permitted_classes: [Date, Time, Symbol], aliases: true) || {} StrategySpec.from_hash(raw) end |