lib/cucumber/ast/visitor.rb in cucumber-0.2.3 vs lib/cucumber/ast/visitor.rb in cucumber-0.3.0

- old
+ new

@@ -6,31 +6,12 @@ attr_reader :step_mother def initialize(step_mother) @options = {} @step_mother = step_mother - @current_feature_lines = [] end - def current_feature_lines=(lines) - @current_feature_lines = lines - end - - def matches_lines?(node) - @current_feature_lines.empty? || node.matches_lines?(@current_feature_lines) - end - - def included_by_tags?(node) - tags = options[:include_tags] || [] - tags.empty? || node.has_tags?(tags) - end - - def excluded_by_tags?(node) - tags = options[:exclude_tags] || [] - tags.any? && node.has_tags?(tags) - end - def matches_scenario_names?(node) scenario_names = options[:scenario_names] || [] scenario_names.empty? || node.matches_scenario_names?(scenario_names) end @@ -91,31 +72,37 @@ def visit_step(step) step.accept(self) end - def visit_step_name(keyword, step_match, status, source_indent, background) + def visit_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background) + visit_step_name(keyword, step_match, status, source_indent, background) + visit_multiline_arg(multiline_arg) if multiline_arg + visit_exception(exception, status) if exception end - def visit_multiline_arg(multiline_arg) + def visit_step_name(keyword, step_match, status, source_indent, background) #:nodoc: + end + + def visit_multiline_arg(multiline_arg) #:nodoc: multiline_arg.accept(self) end - def visit_py_string(string, status) + def visit_exception(exception, status) #:nodoc: end + def visit_py_string(string) + end + def visit_table_row(table_row) table_row.accept(self) end def visit_table_cell(table_cell) table_cell.accept(self) end def visit_table_cell_value(value, width, status) - end - - def visit_exception(exception, status) end def announce(announcement) end