Sha256: 7d9244d532735bb30a4bbcf51cfdbea40e1468a52fea8e4c42de6139fb3fad5c

Contents?: true

Size: 450 Bytes

Versions: 7

Compression:

Stored size: 450 Bytes

Contents

module GirFFI
  module ModuleBase
    def method_missing method, *arguments, &block
      result = gir_ffi_builder.setup_function method.to_s
      return super unless result
      self.send method, *arguments, &block
    end

    def const_missing classname
      klass = gir_ffi_builder.build_class classname.to_s
      return super if klass.nil?
      klass
    end

    def gir_ffi_builder
      self.const_get :GIR_FFI_BUILDER
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-0.0.10 lib/gir_ffi/module_base.rb
gir_ffi-0.0.9 lib/gir_ffi/module_base.rb
gir_ffi-0.0.8 lib/gir_ffi/module_base.rb
gir_ffi-0.0.7 lib/gir_ffi/module_base.rb
gir_ffi-0.0.6 lib/gir_ffi/module_base.rb
gir_ffi-0.0.5 lib/gir_ffi/module_base.rb
gir_ffi-0.0.4 lib/gir_ffi/module_base.rb