Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java = File.open('./java')
- File.open('./c').each_with_index do |line, number|
- if (line[0] != '/') #avoid comments
- convert(line)
- end
- end
- def convert(str)
- name, params = string.gsub!(/_/, ' ').split(" ").drop(2))
- "final Color #{name} = new Color(#{params}}"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement