Class: Cucumber::Formatter::HookQueryVisitor
- Inherits:
-
Object
- Object
- Cucumber::Formatter::HookQueryVisitor
- Defined in:
- lib/cucumber/formatter/hook_query_visitor.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #after_hook ⇒ Object
- #after_step_hook ⇒ Object
- #around_hook ⇒ Object
- #before_hook ⇒ Object
- #hook? ⇒ Boolean
-
#initialize(test_step) ⇒ HookQueryVisitor
constructor
A new instance of HookQueryVisitor.
- #step ⇒ Object
Constructor Details
#initialize(test_step) ⇒ HookQueryVisitor
Returns a new instance of HookQueryVisitor.
7 8 9 10 11 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 7 def initialize(test_step) @hook = false @type = :no_hook test_step.source.last.describe_to(self) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 5 def type @type end |
Instance Method Details
#after_hook ⇒ Object
25 26 27 28 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 25 def after_hook(*) @hook = true @type = :after end |
#after_step_hook ⇒ Object
30 31 32 33 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 30 def after_step_hook(*) @hook = true @type = :after_step end |
#around_hook ⇒ Object
35 36 37 38 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 35 def around_hook(*) @hook = true @type = :around end |
#before_hook ⇒ Object
20 21 22 23 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 20 def before_hook(*) @hook = true @type = :before end |
#hook? ⇒ Boolean
13 14 15 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 13 def hook? @hook end |
#step ⇒ Object
17 18 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 17 def step(*) end |