summaryrefslogtreecommitdiffstats
path: root/lib/efl/ffi/eet.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efl/ffi/eet.rb')
-rw-r--r--lib/efl/ffi/eet.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/efl/ffi/eet.rb b/lib/efl/ffi/eet.rb
index 5e78e09..51b6df1 100644
--- a/lib/efl/ffi/eet.rb
+++ b/lib/efl/ffi/eet.rb
@@ -6,13 +6,15 @@ require 'efl/ffi'
module Efl
#
module Eet
+ #
+ extend Efl::FFIHelper
+ #
def self.method_missing m, *args, &block
- return Efl::FFI.send 'eet_'+m.to_s, *args, &block
+ sym = 'eet_'+m.to_s
+ raise NameError.new "#{self.name}.#{sym} (#{m})" if not self.respond_to? sym
+ self.module_eval "def self.#{m} *args, █ r=self.#{sym}(*args); yield r if block_given?; r; end"
+ self.send sym, *args, &block
end
- end
- #
- module FFI
- #
#
ffi_lib 'eet'
#
@@ -327,6 +329,7 @@ module Efl
]
#
attach_fcts fcts
+ #
end
end
#