class Cucumber::Formatter::LegacyApi::Ast::HookResult
Public Class Methods
new(result, messages, embeddings)
click to toggle source
# File lib/cucumber/formatter/legacy_api/ast.rb, line 69 def initialize(result, messages, embeddings) @result, @messages, @embeddings = result, messages, embeddings @already_accepted = false end
Public Instance Methods
accept(formatter)
click to toggle source
# File lib/cucumber/formatter/legacy_api/ast.rb, line 74 def accept(formatter) unless @already_accepted send_output_to(formatter) describe_exception_to(formatter) end self end
describe_exception_to(formatter)
click to toggle source
# File lib/cucumber/formatter/legacy_api/ast.rb, line 88 def describe_exception_to(formatter) return if @already_accepted @result.describe_exception_to(formatter) @already_accepted = true end
send_output_to(formatter)
click to toggle source
# File lib/cucumber/formatter/legacy_api/ast.rb, line 82 def send_output_to(formatter) return if @already_accepted @messages.each { |message| formatter.puts(message) } @embeddings.each { |embedding| embedding.send_to_formatter(formatter) } end