Sha256: 3a75c0736c7f4513e1e8851e0bed34bb68b65e45e74fabb44fd01394bc9dbd1e

Contents?: true

Size: 243 Bytes

Versions: 2

Compression:

Stored size: 243 Bytes

Contents

module AutotestNotification
  class Doom
    class << self
      def image(total, failures)
        percent = failures.zero? ? 0 : ((5 * failures) / total) + 1
        "#{IMAGES_DIRECTORY}/doom/doom_#{percent}.png"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
carlosbrando-autotest-notification-1.2.0 lib/autotest_notification/doom.rb
notch8-autotest-notification-1.2.0 lib/autotest_notification/doom.rb