Module: FreeType::C::LazyAttach

Included in:
FreeType::C
Defined in:
lib/freetype/c.rb

Instance Method Summary collapse

Instance Method Details

#attach_function(name, func, args, returns = nil, options = nil) ⇒ Object



225
226
227
228
229
230
231
# File 'lib/freetype/c.rb', line 225

def attach_function(name, func, args, returns = nil, options = nil)
  super
rescue FFI::NotFoundError
  define_method(name) do |*|
    raise NotImplementedError, "`#{name}' is not implemented in this system"
  end
end