API Reference¶
Complete API documentation for MywayConfig.
Core Classes¶
- MywayConfig::Base - Base class for configuration
- ConfigSection - Hash-like configuration sections
- Loaders - Configuration loaders
Module¶
MywayConfig¶
The main module provides setup and error classes.
Methods¶
MywayConfig.setup!¶
Registers the XDG and defaults loaders with Anyway Config. Called automatically when the gem is loaded.
MywayConfig.setup?¶
Check if setup has been completed.
MywayConfig.reset!¶
Reset setup state (mainly for testing).
Error Classes¶
MywayConfig::Error¶
Base error class for all MywayConfig errors.
MywayConfig::ConfigurationError¶
Raised for configuration problems:
- Missing defaults file
- Invalid constructor argument
auto_configure!called withoutdefaults_path
begin
MyConfig.new("/nonexistent/file.yml")
rescue MywayConfig::ConfigurationError => e
puts "Config error: #{e.message}"
end
MywayConfig::ValidationError¶
Reserved for validation errors (future use).
Constants¶
MywayConfig::VERSION¶
The gem version string.