Sha256: 26a36a0df223f0c13a05582bb7387d39efd43120bef80ad0bbd99fd3ae8521fe
Contents?: true
Size: 228 Bytes
Versions: 26
Compression:
Stored size: 228 Bytes
Contents
#!/usr/bin/env ruby def to_dot_case(string) string.gsub!('_', ' ') words = string.scan(/\w+/) words.map! do |word| word.downcase end words * '.' end STDIN.each_line do |line| puts to_dot_case(line.chomp!) end
Version data entries
26 entries across 26 versions & 1 rubygems