# File lib/cucumber/formatter/legacy_api/ast.rb, line 68 def initialize(result, messages, embeddings) @result, @messages, @embeddings = result, messages, embeddings @already_accepted = false end
# File lib/cucumber/formatter/legacy_api/ast.rb, line 73 def accept(formatter) unless @already_accepted send_output_to(formatter) describe_exception_to(formatter) end self end
# File lib/cucumber/formatter/legacy_api/ast.rb, line 88 def describe_exception_to(formatter) unless @already_accepted @result.describe_exception_to(formatter) @already_accepted = true end end
# File lib/cucumber/formatter/legacy_api/ast.rb, line 81 def send_output_to(formatter) unless @already_accepted @messages.each { |message| formatter.puts(message) } @embeddings.each { |embedding| embedding.send_to_formatter(formatter) } end end