Sha256: 6eed82685ff0d5910f35b3495b7c1cc152161244e85c690d12f6ecb35a951ca7
Contents?: true
Size: 245 Bytes
Versions: 396
Compression:
Stored size: 245 Bytes
Contents
class Raindrops def self.drops(num : Int32) drops = String.build do |str| str << "Pling" if num % 3 == 0 str << "Plang" if num % 5 == 0 str << "Plong" if num % 7 == 0 end drops.empty? ? num.to_s : drops end end
Version data entries
396 entries across 396 versions & 1 rubygems