Module: Efl::Elm::Helper

Class Method Summary collapse

Class Method Details

.included(kls) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/efl/elm/elm_object.rb', line 12

def self.included kls
    def kls.constructor meth
        self.class_eval <<-EOF
        def initialize ptr, &block
            if ptr.is_a? FFI::Pointer
                super ptr, &block
            else
                super Native.method(:#{meth}), ptr, &block
            end
        end
        EOF
    end
end