Class: RSpec::Core::ConfigurationOptions
- Inherits:
-
Object
- Object
- RSpec::Core::ConfigurationOptions
- Defined in:
- lib/rspec/core/configuration_options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #configure(config) ⇒ Object
- #drb_argv ⇒ Object
- #filter_manager ⇒ Object
-
#initialize(args) ⇒ ConfigurationOptions
constructor
A new instance of ConfigurationOptions.
- #parse_options ⇒ Object
Constructor Details
#initialize(args) ⇒ ConfigurationOptions
Returns a new instance of ConfigurationOptions.
9 10 11 |
# File 'lib/rspec/core/configuration_options.rb', line 9 def initialize(args) @args = args end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/rspec/core/configuration_options.rb', line 7 def @options end |
Instance Method Details
#configure(config) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rspec/core/configuration_options.rb', line 13 def configure(config) formatters = .delete(:formatters) config.filter_manager = filter_manager order(.keys, :libs, :requires, :default_path, :pattern).each do |key| force?(key) ? config.force(key => [key]) : config.send("#{key}=", [key]) end formatters.each {|pair| config.add_formatter(*pair) } if formatters end |
#drb_argv ⇒ Object
31 32 33 |
# File 'lib/rspec/core/configuration_options.rb', line 31 def drb_argv DrbOptions.new(, filter_manager). end |
#filter_manager ⇒ Object
35 36 37 |
# File 'lib/rspec/core/configuration_options.rb', line 35 def filter_manager @filter_manager ||= FilterManager.new end |
#parse_options ⇒ Object
25 26 27 28 29 |
# File 'lib/rspec/core/configuration_options.rb', line 25 def @options ||= extract_filters_from(*all_configs).inject do |merged, pending| merged.merge(pending) end end |