by chris_vannoy · 16y ago · 0 comments
Alternatively, you can wrap into a gem with a C extension and call it with all the Ruby goodness you should expect (recommended route).
Pseudo-code (wordier than it need be):
class MyModel
def self.ocr(file)
result = system("my_ocr_prog", file.path)
return result
end
endA good example of a gem with a C extension might be RMagick (http://github.com/rmagick/rmagick/tree/master/ext/RMagick/)
No comments yet.