Module: RSpec::Core::Hooks::HookExtension

Included in:
AfterHookExtension, AroundHookExtension, BeforeHookExtension
Defined in:
lib/rspec/core/hooks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/rspec/core/hooks.rb', line 7

def options
  @options
end

Instance Method Details

#options_apply?(example_or_group) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/rspec/core/hooks.rb', line 14

def options_apply?(example_or_group)
  example_or_group.all_apply?(options)
end

#with(options) ⇒ Object



9
10
11
12
# File 'lib/rspec/core/hooks.rb', line 9

def with(options)
  @options = options
  self
end