Sha256: 090e437cab24e1885c3f34953fb72446e11970cec9e327bffb7418a726d02a60

Contents?: true

Size: 549 Bytes

Versions: 2

Compression:

Stored size: 549 Bytes

Contents

# frozen_string_literal: true

module Cucumber
  module Formatter
    class DurationExtractor
      attr_reader :result_duration
      def initialize(result)
        @result_duration = 0
        result.describe_to(self)
      end

      def passed(*) end

      def failed(*) end

      def undefined(*) end

      def skipped(*) end

      def pending(*) end

      def exception(*) end

      def duration(duration, *)
        duration.tap { |dur| @result_duration = dur.nanoseconds / 10**9.0 }
      end

      def embed(*) end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-4.0.0.rc.3 lib/cucumber/formatter/duration_extractor.rb
cucumber-4.0.0.rc.2 lib/cucumber/formatter/duration_extractor.rb