📦 SQA::Config¶
Description
Configuration class for SQA settings. Extends Hashie::Dash for property-based configuration with coercion.
🏭 Class Methods¶
.reset()¶
Resets the configuration to default values. Creates a new Config instance and assigns it to SQA.config.
Returns
Type: SQA::Config
The new config instance
Source Location
.initialized?()¶
Returns whether the configuration has been initialized.
Returns
Type: Boolean
true if reset has been called
Source Location
🔨 Instance Methods¶
#command()¶
Returns
Type: String, nil
Current command (nil, 'analysis', or 'web')
Source Location
#command=(value)¶
Returns
Type: String, nil
Current command (nil, 'analysis', or 'web')
Source Location
#config_file()¶
Returns
Type: String, nil
Path to configuration file
Source Location
#config_file=(value)¶
Returns
Type: String, nil
Path to configuration file
Source Location
#dump_config()¶
Returns
Type: String, nil
Path to dump current configuration
Source Location
#dump_config=(value)¶
Returns
Type: String, nil
Path to dump current configuration
Source Location
#data_dir()¶
Returns
Type: String
Directory for data storage (default: ~/sqa_data)
Source Location
#data_dir=(value)¶
Returns
Type: String
Directory for data storage (default: ~/sqa_data)
Source Location
#portfolio_filename()¶
Returns
Type: String
Portfolio CSV filename (default: portfolio.csv)
Source Location
#portfolio_filename=(value)¶
Returns
Type: String
Portfolio CSV filename (default: portfolio.csv)
Source Location
#trades_filename()¶
Returns
Type: String
Trades CSV filename (default: trades.csv)
Source Location
#trades_filename=(value)¶
Returns
Type: String
Trades CSV filename (default: trades.csv)
Source Location
#log_level()¶
Returns
Type: Symbol
Log level (:debug, :info, :warn, :error, :fatal)
Source Location
#log_level=(value)¶
Returns
Type: Symbol
Log level (:debug, :info, :warn, :error, :fatal)
Source Location
#debug()¶
Returns
Type: Boolean
Enable debug mode
Source Location
#debug=(value)¶
Returns
Type: Boolean
Enable debug mode
Source Location
#verbose()¶
Returns
Type: Boolean
Enable verbose output
Source Location
#verbose=(value)¶
Returns
Type: Boolean
Enable verbose output
Source Location
#plotting_library()¶
Returns
Type: Symbol
Plotting library to use (:gruff)
Source Location
#plotting_library=(value)¶
Returns
Type: Symbol
Plotting library to use (:gruff)
Source Location
#lazy_update()¶
Returns
Type: Boolean
Skip API updates if cached data exists
Source Location
#lazy_update=(value)¶
Returns
Type: Boolean
Skip API updates if cached data exists
Source Location
#initialize(a_hash = {})¶
Creates a new Config instance with optional initial values. Automatically applies environment variable overrides.
Parameters
| Name | Type | Description |
|---|---|---|
a_hash |
Hash |
Initial configuration values |
Returns
Type: Config
a new instance of Config
Source Location
#debug?()¶
Returns whether debug mode is enabled.
Returns
Type: Boolean
true if debug mode is on
Source Location
#verbose?()¶
Returns whether verbose mode is enabled.
Returns
Type: Boolean
true if verbose mode is on
Source Location
#from_file()¶
Loads configuration from a file. Supports YAML (.yml, .yaml), TOML (.toml), and JSON (.json) formats.
Returns
Type: void
Source Location
#dump_file()¶
Writes current configuration to a file. Format is determined by file extension.
Returns
Type: void
Source Location
#inject_additional_properties()¶
Injects additional properties from plugins. Allows external code to register new configuration options.
Returns
Type: void