Module: Specdown::Hooks

Extended by:
Hooks
Included in:
Hooks
Defined in:
lib/specdown/hooks.rb

Instance Method Summary collapse

Instance Method Details

#afterObject



27
28
29
# File 'lib/specdown/hooks.rb', line 27

def after
  @after  ||= []
end

#aroundObject



31
32
33
# File 'lib/specdown/hooks.rb', line 31

def around
  @around ||= []
end

#beforeObject



23
24
25
# File 'lib/specdown/hooks.rb', line 23

def before
  @before ||= []
end

#matching_after_hooks(filename) ⇒ Object



15
16
17
# File 'lib/specdown/hooks.rb', line 15

def matching_after_hooks(filename)
  filter after, filename
end

#matching_around_hooks(filename) ⇒ Object



19
20
21
# File 'lib/specdown/hooks.rb', line 19

def matching_around_hooks(filename)
  filter around, filename
end

#matching_before_hooks(filename) ⇒ Object



11
12
13
# File 'lib/specdown/hooks.rb', line 11

def matching_before_hooks(filename)
  filter before, filename
end

#reset!Object



5
6
7
8
9
# File 'lib/specdown/hooks.rb', line 5

def reset!
  @before = []
  @after  = []
  @around = []
end