Class: RSpec::Core::Example::Procsy
- Inherits:
-
Object
- Object
- RSpec::Core::Example::Procsy
- Defined in:
- lib/rspec/core/example.rb
Overview
Note:
This class also exposes the instance methods of RSpec::Core::Example, proxying them through to the wrapped RSpec::Core::Example instance.
Wraps both a Proc
and an RSpec::Core::Example for use in around hooks. In around hooks we need to yield this special
kind of object (rather than the raw RSpec::Core::Example) because when
there are multiple around
hooks we have to wrap them recursively.
Instance Attribute Summary (collapse)
-
- (void) example
readonly
The RSpec::Core::Example instance.
Instance Method Summary (collapse)
-
- (Procsy) initialize(example, &block)
constructor
A new instance of Procsy.
Constructor Details
- (Procsy) initialize(example, &block)
Returns a new instance of Procsy
214 215 216 217 |
# File 'lib/rspec/core/example.rb', line 214 def initialize(example, &block) @example = example @proc = block end |
Instance Attribute Details
- (void) example (readonly)
The RSpec::Core::Example instance.
201 202 203 |
# File 'lib/rspec/core/example.rb', line 201 def example @example end |