
Untitled
By: a guest on
Jun 14th, 2012 | syntax:
Ruby | size: 0.31 KB | hits: 24 | expires: Never
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