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
Version | Path |
---|---|
ix-cli-0.0.6 | bin/ix-dot-case |
ix-cli-0.0.5 | bin/ix-dot-case |
ix-cli-0.0.4 | bin/ix-dot-case |
ix-cli-0.0.3 | bin/ix-dot-case |
ix-cli-0.0.2 | bin/ix-dot-case |
ix-cli-0.0.1 | bin/ix-dot-case |