Sha256: 68a16386668eb9237aafec49c8da8c4cfbec8531f824df220e762abe84998993
Contents?: true
Size: 264 Bytes
Versions: 10
Compression:
Stored size: 264 Bytes
Contents
# = Conjoin # class Array def conjoin( separator=", ", last_separator="and" ) case length when 0: "" when 1: self[0] else [self[0..-2].join("#{separator}"), self[-1]].join(" #{last_separator} ") end end alias join_sentence conjoin end
Version data entries
10 entries across 10 versions & 1 rubygems