Class: Cucumber::Ast::Visitor
Overview
A dumb visitor that implements the whole Visitor API and just walks the tree.
Instance Attribute Summary collapse
Instance Method Summary
collapse
-
#current_feature_lines ⇒ Object
-
#current_feature_lines=(lines) ⇒ Object
-
#initialize(step_mother) ⇒ Visitor
constructor
A new instance of Visitor.
-
#step_definition(step_name) ⇒ Object
-
#visit_comment(comment) ⇒ Object
-
#visit_comment_line(comment_line) ⇒ Object
-
#visit_examples(examples) ⇒ Object
-
#visit_examples_name(keyword, name) ⇒ Object
-
#visit_feature(feature) ⇒ Object
-
#visit_feature_element(feature_element) ⇒ Object
feature_element
is either Scenario or ScenarioOutline.
-
#visit_feature_name(name) ⇒ Object
-
#visit_features(features) ⇒ Object
-
#visit_multiline_arg(multiline_arg, status) ⇒ Object
-
#visit_py_string(string, status) ⇒ Object
-
#visit_scenario_name(keyword, name, file_line, source_indent) ⇒ Object
-
#visit_step(step) ⇒ Object
-
#visit_step_name(keyword, step_name, status, step_definition, source_indent) ⇒ Object
-
#visit_table_cell(table_cell, status) ⇒ Object
-
#visit_table_cell_value(value, width, status) ⇒ Object
-
#visit_table_row(table_row, status) ⇒ Object
-
#visit_tag_name(tag_name) ⇒ Object
-
#visit_tags(tags) ⇒ Object
-
#world(scenario, &proc) ⇒ Object
Constructor Details
#initialize(step_mother) ⇒ Visitor
Returns a new instance of Visitor.
7
8
9
|
# File 'lib/cucumber/ast/visitor.rb', line 7
def initialize(step_mother)
@step_mother = step_mother
end
|
Instance Attribute Details
Returns the value of attribute options.
5
6
7
|
# File 'lib/cucumber/ast/visitor.rb', line 5
def options
@options
end
|
Instance Method Details
#current_feature_lines ⇒ Object
23
24
25
|
# File 'lib/cucumber/ast/visitor.rb', line 23
def current_feature_lines
@current_feature_lines || []
end
|
#current_feature_lines=(lines) ⇒ Object
19
20
21
|
# File 'lib/cucumber/ast/visitor.rb', line 19
def current_feature_lines=(lines)
@current_feature_lines = lines
end
|
#step_definition(step_name) ⇒ Object
15
16
17
|
# File 'lib/cucumber/ast/visitor.rb', line 15
def step_definition(step_name)
@step_mother.step_definition(step_name)
end
|
35
36
37
|
# File 'lib/cucumber/ast/visitor.rb', line 35
def ()
.accept(self)
end
|
39
40
|
# File 'lib/cucumber/ast/visitor.rb', line 39
def ()
end
|
#visit_examples(examples) ⇒ Object
57
58
59
|
# File 'lib/cucumber/ast/visitor.rb', line 57
def visit_examples(examples)
examples.accept(self)
end
|
#visit_examples_name(keyword, name) ⇒ Object
61
62
|
# File 'lib/cucumber/ast/visitor.rb', line 61
def visit_examples_name(keyword, name)
end
|
#visit_feature(feature) ⇒ Object
31
32
33
|
# File 'lib/cucumber/ast/visitor.rb', line 31
def visit_feature(feature)
feature.accept(self)
end
|
#visit_feature_element(feature_element) ⇒ Object
feature_element
is either Scenario or ScenarioOutline
53
54
55
|
# File 'lib/cucumber/ast/visitor.rb', line 53
def visit_feature_element(feature_element)
feature_element.accept(self)
end
|
#visit_feature_name(name) ⇒ Object
49
50
|
# File 'lib/cucumber/ast/visitor.rb', line 49
def visit_feature_name(name)
end
|
#visit_features(features) ⇒ Object
27
28
29
|
# File 'lib/cucumber/ast/visitor.rb', line 27
def visit_features(features)
features.accept(self)
end
|
#visit_multiline_arg(multiline_arg, status) ⇒ Object
74
75
76
|
# File 'lib/cucumber/ast/visitor.rb', line 74
def visit_multiline_arg(multiline_arg, status)
multiline_arg.accept(self, status)
end
|
#visit_py_string(string, status) ⇒ Object
78
79
|
# File 'lib/cucumber/ast/visitor.rb', line 78
def visit_py_string(string, status)
end
|
#visit_scenario_name(keyword, name, file_line, source_indent) ⇒ Object
64
65
|
# File 'lib/cucumber/ast/visitor.rb', line 64
def visit_scenario_name(keyword, name, file_line, source_indent)
end
|
#visit_step(step) ⇒ Object
67
68
69
|
# File 'lib/cucumber/ast/visitor.rb', line 67
def visit_step(step)
step.accept(self)
end
|
#visit_step_name(keyword, step_name, status, step_definition, source_indent) ⇒ Object
71
72
|
# File 'lib/cucumber/ast/visitor.rb', line 71
def visit_step_name(keyword, step_name, status, step_definition, source_indent)
end
|
#visit_table_cell(table_cell, status) ⇒ Object
85
86
87
|
# File 'lib/cucumber/ast/visitor.rb', line 85
def visit_table_cell(table_cell, status)
table_cell.accept(self, status)
end
|
#visit_table_cell_value(value, width, status) ⇒ Object
89
90
|
# File 'lib/cucumber/ast/visitor.rb', line 89
def visit_table_cell_value(value, width, status)
end
|
#visit_table_row(table_row, status) ⇒ Object
81
82
83
|
# File 'lib/cucumber/ast/visitor.rb', line 81
def visit_table_row(table_row, status)
table_row.accept(self, status)
end
|
#visit_tag_name(tag_name) ⇒ Object
46
47
|
# File 'lib/cucumber/ast/visitor.rb', line 46
def visit_tag_name(tag_name)
end
|
42
43
44
|
# File 'lib/cucumber/ast/visitor.rb', line 42
def visit_tags(tags)
tags.accept(self)
end
|
#world(scenario, &proc) ⇒ Object
11
12
13
|
# File 'lib/cucumber/ast/visitor.rb', line 11
def world(scenario, &proc)
@step_mother.world(scenario, &proc)
end
|