class Cucumber::Formatter::LegacyApi::Adapter::LegacyResultBuilder

def append_to_exception_backtrace(line)

def append_to_exception_backtrace(line)
  @exception.set_backtrace(@exception.backtrace + [line.to_s]) if @exception
  return self
end

def describe_exception_to(formatter)

def describe_exception_to(formatter)
  formatter.exception(filtered_exception, @status) if @exception
end

def duration(duration, *)

def duration(duration, *)
  @duration = duration
end

def exception(exception, *)

def exception(exception, *)
  @exception = exception
end

def failed

def failed
  @status = :failed
end

def filtered_exception

def filtered_exception
  Cucumber::Formatter::BacktraceFilter.new(@exception.dup).exception
end

def filtered_step_exception(_step)

def filtered_step_exception(_step)
  exception = filtered_exception
  return Cucumber::Formatter::BacktraceFilter.new(exception).exception
end

def initialize(result)

def initialize(result)
  @result = result
  @result.describe_to(self)
end

def passed

def passed
  @status = :passed
end

def pending(exception, *)

def pending(exception, *)
  @exception = exception
  @status = :pending
end

def scenario(name, location)

def scenario(name, location)
  Ast::Scenario.new(@status, name, location)
end

def scenario_outline(name, location)

def scenario_outline(name, location)
  Ast::ScenarioOutline.new(@status, name, location)
end

def skipped

def skipped
  @status = :skipped
end

def step_exception(step, configuration)

def step_exception(step, configuration)
  return filtered_step_exception(step) if @exception
  return nil unless @status == :undefined && configuration.strict.strict?(:undefined)
  @exception = Cucumber::Undefined.from(@result, step.text)
  @exception.backtrace << step.backtrace_line
  filtered_step_exception(step)
end

def step_invocation(step_match, step, indent, background, configuration, messages, embeddings)

def step_invocation(step_match, step, indent, background, configuration, messages, embeddings)
  Ast::StepInvocation.new(step_match, @status, @duration, step_exception(step, configuration), indent, background, step, messages, embeddings)
end

def undefined

def undefined
  @status = :undefined
end