Class: GObjectIntrospection::TypeTag::ARRAY

Inherits:
Object
  • Object
show all
Extended by:
ArrayTypeTag
Defined in:
lib/gobject-introspection/type-tag.rb

Class Method Summary collapse

Methods included from ArrayTypeTag

description, get_element_type_info, try_convert

Class Method Details

.try_convert(type_info, value) ⇒ Object



143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/gobject-introspection/type-tag.rb', line 143

def try_convert(type_info, value)
  case get_element_type_info(type_info).tag
  when INT8, UINT8
    case value
    when String
      return value
    when GLib::Bytes
      return value.to_s
    end
  end
  super
end