module WinGUI::Util

Constants

Id2Ref

Public Class Methods

FormatException(ex) click to toggle source
# File lib/ffi-wingui-core/common.rb, line 12
def FormatException(ex)
        str, trace = ex.to_s, ex.backtrace

        str << "\n\n-- backtrace --\n\n" << trace.join("\n") if trace

        str
end
Id2RefTrack(object) click to toggle source
# File lib/ffi-wingui-core/common.rb, line 24
def Id2RefTrack(object)
        Id2Ref[object.object_id] = object

        ObjectSpace.define_finalizer(object, -> id {
                Id2Ref.delete(id)
        })
end

Private Instance Methods

FormatException(ex) click to toggle source
# File lib/ffi-wingui-core/common.rb, line 12
def FormatException(ex)
        str, trace = ex.to_s, ex.backtrace

        str << "\n\n-- backtrace --\n\n" << trace.join("\n") if trace

        str
end
Id2RefTrack(object) click to toggle source
# File lib/ffi-wingui-core/common.rb, line 24
def Id2RefTrack(object)
        Id2Ref[object.object_id] = object

        ObjectSpace.define_finalizer(object, -> id {
                Id2Ref.delete(id)
        })
end