Sha256: ef3017a67e0bc42105282b25360755bd38b361ef2122a791f398f38ae4ddb39d
Contents?: true
Size: 380 Bytes
Versions: 23
Compression:
Stored size: 380 Bytes
Contents
module Pathway module Rspec module ListHelpers def as_list(items) as_sentence(items.map(&:inspect)) end def as_sentence(items, connector: ", ", last_connector: " and ") *rest, last = items result = String.new result << rest.join(connector) << last_connector if rest.any? result << last end end end end
Version data entries
23 entries across 23 versions & 1 rubygems