turboladen/ffi-gdal — pull request #7 by turboladen (2014-10-17 21:19:55+00:00)
Title: Detect unsupported functions to allow for older versions

In order to save from bombing out on load, I overrode FFI::Library's `.attach_function` to rescue the exception that gets raised there and add those unsupported functions to a list. Then, Ruby wrapper methods can check the "unsupported" list to see if that call can be made or not. I only added these checks for the few methods that seemed to not be supported when using GDAL on my ubuntu box; still though, when called, the caller will just get a MethodNotFound exception at run time, which is better (IMO) than disabling the whole library from running.