Module RSpec::Core::Example::Procsy
In: lib/rspec/core/example.rb

Used to extend a `Proc` with behavior that makes it look something like an {Example} in an {Hooks#around around} hook.

@note Procsy, itself, is not a public API, but we‘re documenting it

  here to document how to interact with the object yielded to an
  `around` hook.

@example

    RSpec.configure do |c|
      c.around do |ex| # ex is a Proc extended with Procsy
        if ex.metadata[:key] == :some_value && some_global_condition
          raise "some message"
        end
        ex.run         # run delegates to ex.call
      end
    end

Methods

extended   with  

Attributes

metadata  [R]  The `metadata` of the {Example} instance.

Public Class methods

@api private @param [Proc] Adds a `run` method to the extended Proc, allowing it to be invoked in an [around](../Hooks#around-instance_method) hook using either `run` or `call`.

Public Instance methods

@api private

[Validate]