Sha256: e2d450eebbfbe91f471a8c3608f626369869784753bfe7a0e8f5fc580c374fea
Contents?: true
Size: 274 Bytes
Versions: 5
Compression:
Stored size: 274 Bytes
Contents
# frozen_string_literal: true module BestBoy module BestBoyViewHelper def relative_occurrences(hash, key) val = hash[key].to_f val = val / hash[:overall].to_f * 100 if hash[:overall].to_i > 0 number_to_percentage(val, precision: 2) end end end
Version data entries
5 entries across 5 versions & 1 rubygems