Created
February 6, 2015 08:46
-
-
Save kota/4cfb08948eed38c966b4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# usage: ruby insert_property_annotation.rb < file | |
lines = STDIN.readlines | |
lines.each do |line| | |
if !(line =~ / class /) && line =~ /(\s+?)(public|private) (.+?) (.+?)[\s;]/ | |
puts %W(#{$1}@property("#{$4.underscore}")) | |
puts line | |
else | |
puts line | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment