Sha256: 13db4474ef1286d4ef55a24b9779212588ef9d361e7da9f8455e74365615f8c5
Contents?: true
Size: 657 Bytes
Versions: 38
Compression:
Stored size: 657 Bytes
Contents
module Helper class EnergyBandCalculator def self.domestic(number) case number when proc { |n| n <= 20 } "g" when 21..38 "f" when 39..54 "e" when 55..68 "d" when 69..80 "c" when 81..91 "b" else "a" end end def self.commercial(number) case number when proc { |n| n <= -1 } "a+" when 0..25 "a" when 26..50 "b" when 51..75 "c" when 76..100 "d" when 101..125 "e" when 126..150 "f" else "g" end end end end
Version data entries
38 entries across 38 versions & 1 rubygems