class RSpec::Core::ConfigurationOptions
Responsible for utilizing externally provided configuration options, whether via the command line, ‘.rspec`, `~/.rspec`, `$XDG_CONFIG_HOME/rspec/options`, `.rspec-local` or a custom options file.
Constants
- OPTIONS_ORDER
- UNFORCED_OPTIONS
- UNPROCESSABLE_OPTIONS
Attributes
@return [Array<String>] the original command-line arguments
@return [Hash] the final merged options, drawn from all external sources
Public Class Methods
@param args [Array<String>] command line arguments
# File rspec-core/lib/rspec/core/configuration_options.rb, line 12 def initialize(args) @args = args.dup organize_options end
Public Instance Methods
Updates the provided {Configuration} instance based on the provided external configuration options.
@param config [Configuration] the configuration instance to update
# File rspec-core/lib/rspec/core/configuration_options.rb, line 21 def configure(config) process_options_into config configure_filter_manager config.filter_manager load_formatters_into config end
@api private Updates the provided {FilterManager} based on the filter options. @param filter_manager [FilterManager] instance to update
# File rspec-core/lib/rspec/core/configuration_options.rb, line 30 def configure_filter_manager(filter_manager) @filter_manager_options.each do |command, value| filter_manager.__send__ command, value end end