module GObjectIntrospection::TypeTag::IntegerTypeTag

Public Instance Methods

try_convert(type_info, value) click to toggle source
# File lib/gobject-introspection/type-tag.rb, line 41
def try_convert(type_info, value)
  if value.is_a?(Integer)
    value
  elsif value.respond_to?(:to_int)
    value.to_int
  else
    nil
  end
end