Class: Utils::ConfigFile::Probe
- Inherits:
-
BlockConfig
- Object
- BlockConfig
- Utils::ConfigFile::Probe
- Defined in:
- lib/utils/config_file.rb
Instance Method Summary collapse
-
#include_dirs_argument ⇒ String
The include_dirs_argument method constructs a colon-separated string from include directories.
-
#initialize(&block) ⇒ Probe
constructor
The initialize method sets up the configuration by validating the test framework.
Methods inherited from BlockConfig
Constructor Details
#initialize(&block) ⇒ Probe
The initialize method sets up the configuration by validating the test framework.
This method initializes the configuration object and ensures that the specified test framework is one of the allowed values. It raises an error if the test framework is not supported.
197 198 199 200 201 202 203 |
# File 'lib/utils/config_file.rb', line 197 def initialize(&block) super test_frameworks_allowed = [ :'test-unit', :rspec ] test_frameworks_allowed.include?(test_framework) or raise ConfigFileError, "test_framework has to be in #{test_frameworks_allowed.inspect}" end |
Instance Method Details
#include_dirs_argument ⇒ String
The include_dirs_argument method constructs a colon-separated string from include directories.
This method takes the include directories configuration and converts it into a single colon-delimited string suitable for use in command-line arguments or environment variables.
185 186 187 |
# File 'lib/utils/config_file.rb', line 185 def include_dirs_argument Array(include_dirs) * ':' end |