Class: RSpec::Core::SharedExampleGroup::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/core/shared_example_group/collection.rb

Instance Method Summary (collapse)

Constructor Details

- (Collection) initialize(sources, examples)

A new instance of Collection

6
7
8
# File 'lib/rspec/core/shared_example_group/collection.rb', line 6
def initialize(sources, examples)
  @sources, @examples = sources, examples
end

Instance Method Details

- (Object) [](key)

10
11
12
# File 'lib/rspec/core/shared_example_group/collection.rb', line 10
def [](key)
  fetch_examples(key) || warn_deprecation_and_fetch_anyway(key)
end