Class: 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.
6 7 8 9 10 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 6 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.
4 5 6 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 4 def type @type end |
Instance Method Details
#after_hook ⇒ Object
24 25 26 27 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 24 def after_hook(*) @hook = true @type = :after end |
#after_step_hook ⇒ Object
29 30 31 32 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 29 def after_step_hook(*) @hook = true @type = :after_step end |
#around_hook ⇒ Object
34 35 36 37 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 34 def around_hook(*) @hook = true @type = :around end |
#before_hook ⇒ Object
19 20 21 22 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 19 def before_hook(*) @hook = true @type = :before end |
#hook? ⇒ Boolean
12 13 14 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 12 def hook? @hook end |
#step ⇒ Object
16 17 |
# File 'lib/cucumber/formatter/hook_query_visitor.rb', line 16 def step(*) end |