class RSpec::Core::Example::Procsy

proxying them through to the wrapped {Example} instance.
@note This class also exposes the instance methods of {Example},
end
end
ex.run # run delegates to ex.call
end
raise “some message”
if ex.metadata == :some_value && some_global_condition
c.around do |ex| # Procsy which wraps the example
RSpec.configure do |c|
@example
there are multiple ‘around` hooks we have to wrap them recursively.
kind of object (rather than the raw {Example}) because when
around} hooks. In around hooks we need to yield this special
Wraps both a `Proc` and an {Example} for use in {Hooks#around

def call(*args, &block)

Calls the proc and notes that the example has been executed.
def call(*args, &block)
  @executed = true
  @proc.call(*args, &block)
end

def executed?

Indicates whether or not the around hook has executed the example.
def executed?
  @executed
end

def initialize(example, &block)

def initialize(example, &block)
  @example  = example
  @proc     = block
  @executed = false
end

def inspect

Other tags:
    Private: -
def inspect
  @example.inspect.gsub('Example', 'ExampleProcsy')
end

def to_proc

Provides a wrapped proc that will update our `executed?` state when executed.
def to_proc
  method(:call).to_proc
end

def wrap(&block)

Other tags:
    Private: -
def wrap(&block)
  self.class.new(example, &block)
end