# File lib/gherkin/listener/formatter_listener.rb, line 93 def initialize @comments, @tags, @ids = [], [], [] @row_index = 0 end
# File lib/gherkin/listener/formatter_listener.rb, line 121 def basic_statement @row_index += 1 yield @comments, "#{@examples_id};#{@row_index}" @comments = [] end
# File lib/gherkin/listener/formatter_listener.rb, line 98 def comment(comment) @comments << comment end
# File lib/gherkin/listener/formatter_listener.rb, line 114 def examples(name) @examples_id = "#{@feature_element_id};#{id(name)}" @row_index = 0 yield @comments, @tags, @examples_id @comments, @tags = [], [] end
# File lib/gherkin/listener/formatter_listener.rb, line 102 def feature(name) @feature_id = id(name) yield @comments, @tags, @feature_id @comments, @tags = [], [] end
# File lib/gherkin/listener/formatter_listener.rb, line 108 def feature_element(name) @feature_element_id = "#{@feature_id};#{id(name)}" yield @comments, @tags, @feature_element_id @comments, @tags = [], [] end
# File lib/gherkin/listener/formatter_listener.rb, line 131 def id(name) (name || '').gsub(/[\s_]/, '-').downcase end
# File lib/gherkin/listener/formatter_listener.rb, line 127 def tag(tag) @tags << tag end