Skip to content

Instantly share code, notes, and snippets.

@mshirdel
Last active September 21, 2016 11:11
Show Gist options
  • Save mshirdel/988b7844bb5138c67139bfb8b25220f2 to your computer and use it in GitHub Desktop.
Save mshirdel/988b7844bb5138c67139bfb8b25220f2 to your computer and use it in GitHub Desktop.
Convert underscored text to C# property
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