Sha256: ec58c4e84cd79e5f21b878151182de727620eabf3d36acb9fb0ccda138e04e25
Contents?: true
Size: 310 Bytes
Versions: 2
Compression:
Stored size: 310 Bytes
Contents
class Integer def pluralize(desc) if self == 0 "no #{desc.to_s.pluralize}" elsif self == 1 "#{self} #{desc}" else "#{self} #{desc.to_s.pluralize}" end end def dotted data = self.to_s while data.sub!(/(\d)(\d{3})$/, "\\1.\\2") 1 end data end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lux-fw-0.1.35 | ./lib/overload/integer.rb |
lux-fw-0.1.17 | ./lib/overload/integer.rb |