class GObjectIntrospection::RegisteredTypeInfo
Public Instance Methods
description()
click to toggle source
# File lib/gobject-introspection/registered-type-info.rb, line 45 def description "#{gtype.to_class}(#{gtype.name})" end
try_convert(value)
click to toggle source
# File lib/gobject-introspection/registered-type-info.rb, line 19 def try_convert(value) return nil if value.nil? type = gtype if type == GLib::Type::NONE ns = namespace return value unless Object.const_defined?(ns) mod = Object.const_get(ns) return value unless mod.const_defined?(name) klass = mod.const_get(name) else klass = type.to_class end case value when klass value else if klass.respond_to?(:try_convert) klass.try_convert(value) else nil end end end