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.
-
#new_world ⇒ Object
-
#step_definition(step_name) ⇒ Object
-
#visit_background(background) ⇒ 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_outline_table(outline_table) ⇒ 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_steps(steps) ⇒ 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, world = nil, &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
27
28
29
|
# File 'lib/cucumber/ast/visitor.rb', line 27
def current_feature_lines
@current_feature_lines || []
end
|
#current_feature_lines=(lines) ⇒ Object
23
24
25
|
# File 'lib/cucumber/ast/visitor.rb', line 23
def current_feature_lines=(lines)
@current_feature_lines = lines
end
|
#new_world ⇒ Object
15
16
17
|
# File 'lib/cucumber/ast/visitor.rb', line 15
def new_world
@step_mother.new_world
end
|
#step_definition(step_name) ⇒ Object
19
20
21
|
# File 'lib/cucumber/ast/visitor.rb', line 19
def step_definition(step_name)
@step_mother.step_definition(step_name)
end
|
#visit_background(background) ⇒ Object
61
62
63
|
# File 'lib/cucumber/ast/visitor.rb', line 61
def visit_background(background)
background.accept(self)
end
|
39
40
41
|
# File 'lib/cucumber/ast/visitor.rb', line 39
def ()
.accept(self)
end
|
43
44
|
# File 'lib/cucumber/ast/visitor.rb', line 43
def ()
end
|
#visit_examples(examples) ⇒ Object
65
66
67
|
# File 'lib/cucumber/ast/visitor.rb', line 65
def visit_examples(examples)
examples.accept(self)
end
|
#visit_examples_name(keyword, name) ⇒ Object
69
70
|
# File 'lib/cucumber/ast/visitor.rb', line 69
def visit_examples_name(keyword, name)
end
|
#visit_feature(feature) ⇒ Object
35
36
37
|
# File 'lib/cucumber/ast/visitor.rb', line 35
def visit_feature(feature)
feature.accept(self)
end
|
#visit_feature_element(feature_element) ⇒ Object
feature_element is either Scenario or ScenarioOutline
57
58
59
|
# File 'lib/cucumber/ast/visitor.rb', line 57
def visit_feature_element(feature_element)
feature_element.accept(self)
end
|
#visit_feature_name(name) ⇒ Object
53
54
|
# File 'lib/cucumber/ast/visitor.rb', line 53
def visit_feature_name(name)
end
|
#visit_features(features) ⇒ Object
31
32
33
|
# File 'lib/cucumber/ast/visitor.rb', line 31
def visit_features(features)
features.accept(self)
end
|
#visit_multiline_arg(multiline_arg, status) ⇒ Object
90
91
92
|
# File 'lib/cucumber/ast/visitor.rb', line 90
def visit_multiline_arg(multiline_arg, status)
multiline_arg.accept(self, status)
end
|
#visit_outline_table(outline_table) ⇒ Object
72
73
74
|
# File 'lib/cucumber/ast/visitor.rb', line 72
def visit_outline_table(outline_table)
outline_table.accept(self, nil)
end
|
#visit_py_string(string, status) ⇒ Object
94
95
|
# File 'lib/cucumber/ast/visitor.rb', line 94
def visit_py_string(string, status)
end
|
#visit_scenario_name(keyword, name, file_line, source_indent) ⇒ Object
76
77
|
# File 'lib/cucumber/ast/visitor.rb', line 76
def visit_scenario_name(keyword, name, file_line, source_indent)
end
|
#visit_step(step) ⇒ Object
83
84
85
|
# File 'lib/cucumber/ast/visitor.rb', line 83
def visit_step(step)
step.accept(self)
end
|
#visit_step_name(keyword, step_name, status, step_definition, source_indent) ⇒ Object
87
88
|
# File 'lib/cucumber/ast/visitor.rb', line 87
def visit_step_name(keyword, step_name, status, step_definition, source_indent)
end
|
#visit_steps(steps) ⇒ Object
79
80
81
|
# File 'lib/cucumber/ast/visitor.rb', line 79
def visit_steps(steps)
steps.accept(self)
end
|
#visit_table_cell(table_cell, status) ⇒ Object
101
102
103
|
# File 'lib/cucumber/ast/visitor.rb', line 101
def visit_table_cell(table_cell, status)
table_cell.accept(self, status)
end
|
#visit_table_cell_value(value, width, status) ⇒ Object
105
106
|
# File 'lib/cucumber/ast/visitor.rb', line 105
def visit_table_cell_value(value, width, status)
end
|
#visit_table_row(table_row, status) ⇒ Object
97
98
99
|
# File 'lib/cucumber/ast/visitor.rb', line 97
def visit_table_row(table_row, status)
table_row.accept(self, status)
end
|
#visit_tag_name(tag_name) ⇒ Object
50
51
|
# File 'lib/cucumber/ast/visitor.rb', line 50
def visit_tag_name(tag_name)
end
|
46
47
48
|
# File 'lib/cucumber/ast/visitor.rb', line 46
def visit_tags(tags)
tags.accept(self)
end
|
#world(scenario, world = nil, &proc) ⇒ Object
11
12
13
|
# File 'lib/cucumber/ast/visitor.rb', line 11
def world(scenario, world = nil, &proc)
@step_mother.world(scenario, world, &proc)
end
|