Last active
September 21, 2016 11:11
-
-
Save mshirdel/988b7844bb5138c67139bfb8b25220f2 to your computer and use it in GitHub Desktop.
Convert underscored text to C# property
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARGV.each do |arg| | |
text=File.open(arg).read | |
text.gsub!(/\r\n?/, "\n") | |
text.each_line do |line| | |
p = line.gsub("\n",'').split('_').collect(&:capitalize).join | |
puts "public string #{p} { get; set; } // #{line}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment