class GObjectIntrospection::RegisteredTypeInfo

Public Instance Methods

description() click to toggle source
# File lib/gobject-introspection/registered-type-info.rb, line 38
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
  return value if type == GLib::Type::NONE

  klass = type.to_class
  case value
  when klass
    value
  else
    if klass.respond_to?(:try_convert)
      klass.try_convert(value)
    else
      nil
    end
  end
end