Sha256: 2ff7d064f0781825c7f512f80116c31069842a2dc692ca1bb24192010362480f
Contents?: true
Size: 272 Bytes
Versions: 9
Compression:
Stored size: 272 Bytes
Contents
module ToPass::Converters class FirstChars class << self # reduces every word to its first character, preserving case def first_chars(string) string.split(' ').map do |word| word[0].chr end.join(' ') end end end end
Version data entries
9 entries across 9 versions & 1 rubygems