Sha256: d18c62b0d51d4d1b4ba70705964d51890f35c3bf8f10b1e5d8c86b3f11c86aec
Contents?: true
Size: 300 Bytes
Versions: 2
Compression:
Stored size: 300 Bytes
Contents
class String def truncate(width) self[0, width] end def convert_entities self.gsub(/>/, '>').gsub(/</, '<').gsub(/&/, '&') end def pluralize(n, suffix = 's', singular_suffix = '') if n == 1 self + singular_suffix else self + suffix end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
usaidwat-1.0.1 | lib/usaidwat/ext/string.rb |
usaidwat-1.0.0 | lib/usaidwat/ext/string.rb |