Module: Factorix::Runtime::UserConfigurable
- Included in:
- Base
- Defined in:
- lib/factorix/runtime/user_configurable.rb
Overview
Provides user-configurable path overrides for Runtime
This module is prepended to Runtime::Base to allow users to override auto-detected paths via configuration. When a configured path is available, it is used instead of platform-specific auto-detection.
Configuration is done via Factorix.config:
All path resolution decisions are logged at DEBUG level.
Instance Method Summary collapse
-
#data_dir ⇒ Pathname
Get the Factorio data directory path.
-
#executable_path ⇒ Pathname
Get the Factorio executable path.
-
#user_dir ⇒ Pathname
Get the Factorio user directory path.
Instance Method Details
#data_dir ⇒ Pathname
Get the Factorio data directory path
Returns the configured data_dir if available, otherwise falls back to platform-specific auto-detection.
46 |
# File 'lib/factorix/runtime/user_configurable.rb', line 46 def data_dir = configurable_path(:data_dir, example_path: "/path/to/factorio/data") { super } |
#executable_path ⇒ Pathname
Get the Factorio executable path
Returns the configured executable path if available, otherwise falls back to platform-specific auto-detection.
28 |
# File 'lib/factorix/runtime/user_configurable.rb', line 28 def executable_path = configurable_path(:executable_path, example_path: "/path/to/factorio") { super } |
#user_dir ⇒ Pathname
Get the Factorio user directory path
Returns the configured user_dir if available, otherwise falls back to platform-specific auto-detection.
37 |
# File 'lib/factorix/runtime/user_configurable.rb', line 37 def user_dir = configurable_path(:user_dir, example_path: "/path/to/factorio/user/dir") { super } |