Sha256: a80059878fef5929ef580b1c93a2fd9986cce5522c4678189e6c1875ed8f6e68

Contents?: true

Size: 535 Bytes

Versions: 4

Compression:

Stored size: 535 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 { |duration| @result_duration = duration.nanoseconds / 10**9.0 }
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
cucumber-3.2.0 lib/cucumber/formatter/duration_extractor.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/cucumber-3.1.2/lib/cucumber/formatter/duration_extractor.rb
cucumber-3.1.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-3.1.1 lib/cucumber/formatter/duration_extractor.rb