Class: RSpec::Core::Hooks::BeforeHook

Inherits:
Hook
  • Object
show all
Defined in:
lib/rspec/core/hooks.rb

Instance Attribute Summary

Attributes inherited from Hook

#options

Instance Method Summary collapse

Methods inherited from Hook

#call, #display_name, #initialize, #options_apply?, #to_proc

Constructor Details

This class inherits a constructor from RSpec::Core::Hooks::Hook

Instance Method Details

#run_in(example_group_instance) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/rspec/core/hooks.rb', line 33

def run_in(example_group_instance)
  if example_group_instance
    example_group_instance.instance_eval(&self)
  else
    call
  end
end