Class: RSpec::Core::ConfigurationOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ ConfigurationOptions



12
13
14
15
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb', line 12

def initialize(args)
  @args = args.dup
  organize_options
end

Instance Attribute Details

#argsArray<String> (readonly)



40
41
42
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb', line 40

def args
  @args
end

#optionsHash (readonly)



37
38
39
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration_options.rb', line 37

def options
  @options
end

Instance Method Details

#configure(config) ⇒ Object

Updates the provided RSpec::Core::Configuration instance based on the provided external configuration options.



21
22
23
24
25
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/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

#configure_filter_manager(filter_manager) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Updates the provided FilterManager based on the filter options.



30
31
32
33
34
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/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