Sha256: 93c9bf391abf01816735e67a65dbcc4ca2ebd51dc5ad2c4732a595854262fa02
Contents?: true
Size: 590 Bytes
Versions: 11
Compression:
Stored size: 590 Bytes
Contents
module Relevance module CoreExtensions module Nil def ellipsize(cutoff = 20) "" end end module String def ellipsize(cutoff = 20) if length > cutoff "#{self[0...cutoff]}..." else self end end end module Object def ellipsize(cutoff = 20) inspect.ellipsize(cutoff) end end end end class Object include Relevance::CoreExtensions::Object end class String include Relevance::CoreExtensions::String end class NilClass include Relevance::CoreExtensions::Nil end
Version data entries
11 entries across 11 versions & 2 rubygems