Methods

Class/Module Index [+]

Quicksearch

RSpec::Core::Hooks::AroundHookCollection

@private

Public Instance Methods

for(example, initial_procsy=nil) click to toggle source
# File lib/rspec/core/hooks.rb, line 416
def for(example, initial_procsy=nil)
  self.class.new(hooks.select {|hook| hook.options_apply?(example)}).
    with(example, initial_procsy)
end
run() click to toggle source
# File lib/rspec/core/hooks.rb, line 427
def run
  hooks.inject(@initial_procsy) do |procsy, around_hook|
    procsy.wrap do
      @example.instance_exec(procsy, &around_hook.block)
    end
  end.call
end
with(example, initial_procsy) click to toggle source
# File lib/rspec/core/hooks.rb, line 421
def with(example, initial_procsy)
  @example = example
  @initial_procsy = initial_procsy
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.