12 lines
363 B
Ruby
Executable File
12 lines
363 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
require 'active_support/core_ext/string/inflections'
|
|
|
|
file = "/home/tsv/foxsoft/directors-uk/clapboard/app/models/concerns/progress_countries.rb"
|
|
|
|
File.open(file, "r+") do |f|
|
|
while(line = f.gets) != nil
|
|
m = line.match /\s\[\"(?<country>[\w\s\:\&\'\-\;\(\)]*)\".*\]/
|
|
puts line.gsub(m[:country], m[:country].titlecase) if m
|
|
end
|
|
end
|