Sha256: 1e15145d024f43221cd6a3f234f83c89a7a37ea840be680dc628c63013b8e204

Contents?: true

Size: 551 Bytes

Versions: 15

Compression:

Stored size: 551 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 attach(*) end
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
cucumber-9.2.0 lib/cucumber/formatter/duration_extractor.rb
cucumber-9.1.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-9.1.1 lib/cucumber/formatter/duration_extractor.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.1.0/lib/cucumber/formatter/duration_extractor.rb
cucumber-9.1.0 lib/cucumber/formatter/duration_extractor.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/cucumber-9.0.2/lib/cucumber/formatter/duration_extractor.rb
cucumber-9.0.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-9.0.1 lib/cucumber/formatter/duration_extractor.rb
cucumber-9.0.0 lib/cucumber/formatter/duration_extractor.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration_extractor.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration_extractor.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration_extractor.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/formatter/duration_extractor.rb
cucumber-8.0.0 lib/cucumber/formatter/duration_extractor.rb
cucumber-8.0.0.rc.1 lib/cucumber/formatter/duration_extractor.rb