Class: Cucumber::Formatter::HookQueryVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/hook_query_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_step) ⇒ HookQueryVisitor



8
9
10
11
12
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 8

def initialize(test_step)
  @hook = false
  @type = :no_hook
  test_step.source.last.describe_to(self)
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type



6
7
8
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 6

def type
  @type
end

Instance Method Details

#after_hookObject



26
27
28
29
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 26

def after_hook(*)
  @hook = true
  @type = :after
end

#after_step_hookObject



31
32
33
34
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 31

def after_step_hook(*)
  @hook = true
  @type = :after_step
end

#around_hookObject



36
37
38
39
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 36

def around_hook(*)
  @hook = true
  @type = :around
end

#before_hookObject



21
22
23
24
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 21

def before_hook(*)
  @hook = true
  @type = :before
end

#hook?Boolean



14
15
16
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 14

def hook?
  @hook
end

#stepObject



18
19
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 18

def step(*)
end