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.27 bin/ix-dot-case
ix-cli-0.0.26 bin/ix-dot-case
ix-cli-0.0.25 bin/ix-dot-case
ix-cli-0.0.24 bin/ix-dot-case
ix-cli-0.0.23 bin/ix-dot-case
ix-cli-0.0.22 bin/ix-dot-case
ix-cli-0.0.21 bin/ix-dot-case
ix-cli-0.0.20 bin/ix-dot-case
ix-cli-0.0.19 bin/ix-dot-case
ix-cli-0.0.18 bin/ix-dot-case
ix-cli-0.0.17 bin/ix-dot-case
ix-cli-0.0.16 bin/ix-dot-case
ix-cli-0.0.15 bin/ix-dot-case
ix-cli-0.0.14 bin/ix-dot-case
ix-cli-0.0.13 bin/ix-dot-case
ix-cli-0.0.12 bin/ix-dot-case
ix-cli-0.0.11 bin/ix-dot-case
ix-cli-0.0.10 bin/ix-dot-case
ix-cli-0.0.9 bin/ix-dot-case
ix-cli-0.0.7 bin/ix-dot-case