/usr/lib/ruby/vendor_ruby/gir_ffi/module_base.rb is in ruby-gir-ffi 0.9.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | module GirFFI
# Base module for modules representing GLib namespaces.
module ModuleBase
def method_missing(method, *arguments, &block)
result = setup_method method.to_s
return super unless result
send method, *arguments, &block
end
def const_missing(classname)
load_class(classname)
end
def load_class(classname)
gir_ffi_builder.build_namespaced_class classname.to_s
end
def gir_ffi_builder
self::GIR_FFI_BUILDER
end
def setup_method(name)
gir_ffi_builder.setup_method name
end
end
end
|