Parent

Files

Class/Module Index [+]

Quicksearch

RSpec::Core::Hooks::Hook

Attributes

options[R]

Public Class Methods

new(options, &block) click to toggle source
# File lib/rspec/core/hooks.rb, line 9
def initialize(options, &block)
  @options = options
  raise "no block given for #{display_name}" unless block
  @block = block
end

Public Instance Methods

call() click to toggle source
# File lib/rspec/core/hooks.rb, line 23
def call
  @block.call
end
display_name() click to toggle source
# File lib/rspec/core/hooks.rb, line 27
def display_name
  self.class.name.split('::').last.gsub('Hook','').downcase << " hook"
end
options_apply?(example_or_group) click to toggle source
# File lib/rspec/core/hooks.rb, line 15
def options_apply?(example_or_group)
  example_or_group.all_apply?(options)
end
to_proc() click to toggle source
# File lib/rspec/core/hooks.rb, line 19
def to_proc
  @block
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.