@private
# File lib/rspec/core/shared_example_group.rb, line 111 def add(context, name, *metadata_args, &block) ensure_block_has_source_location(block) { CallerFilter.first_non_rspec_line } if valid_name?(name) warn_if_key_taken context, name, block shared_example_groups[context][name] = block else metadata_args.unshift name end unless metadata_args.empty? mod = Module.new (class << mod; self; end).__send__(:define_method, :included) do |host| host.class_exec(&block) end RSpec.configuration.include mod, *metadata_args end end
Generated with the Darkfish Rdoc Generator 2.