class Cucumber::Formatter::LegacyApi::Ast::HookResult

def accept(formatter)

def accept(formatter)
  unless @already_accepted
    send_output_to(formatter)
    describe_exception_to(formatter)
  end
  self
end

def describe_exception_to(formatter)

def describe_exception_to(formatter)
  unless @already_accepted
    @result.describe_exception_to(formatter)
    @already_accepted = true
  end
end

def initialize(result, messages, embeddings)

def initialize(result, messages, embeddings)
  @result, @messages, @embeddings = result, messages, embeddings
  @already_accepted = false
end

def send_output_to(formatter)

def send_output_to(formatter)
  unless @already_accepted
    @messages.each { |message| formatter.puts(message) }
    @embeddings.each { |embedding| embedding.send_to_formatter(formatter) }
  end
end