Module: ClaudeSwarm::YamlLoader
- Defined in:
- lib/claude_swarm/yaml_loader.rb
Overview
Provides consistent YAML loading across the application
Class Method Summary collapse
-
.load_config_file(file_path) ⇒ Hash
Load a YAML configuration file (enables aliases for configuration flexibility).
Class Method Details
.load_config_file(file_path) ⇒ Hash
Load a YAML configuration file (enables aliases for configuration flexibility)
11 12 13 14 15 16 17 18 19 |
# File 'lib/claude_swarm/yaml_loader.rb', line 11 def load_config_file(file_path) YAML.load_file(file_path, aliases: true) rescue Errno::ENOENT raise ClaudeSwarm::Error, "Configuration file not found: #{file_path}" rescue Psych::SyntaxError => e raise ClaudeSwarm::Error, "Invalid YAML syntax in #{file_path}: #{e.message}" rescue Psych::BadAlias => e raise ClaudeSwarm::Error, "Invalid YAML alias in #{file_path}: #{e.message}" end |