Sha256: b0b92e1412b749c8aae24b36311c3e2644914138fcc4ffa2cf42e6a9bae808d6
Contents?: true
Size: 759 Bytes
Versions: 5
Compression:
Stored size: 759 Bytes
Contents
module Helper class EnergyBandCalculator def self.domestic(number) if number.nil? return nil end 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) if number.nil? return nil end 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
5 entries across 5 versions & 1 rubygems