module GObjectIntrospection::TypeTag::ArrayTypeTag

Public Instance Methods

description(type_info) click to toggle source
# File lib/gobject-introspection/type-tag.rb, line 128
def description(type_info)
  element_type_info = type_info.get_param_type(0)
  "#{super}(#{element_type_info.description})"
end
get_element_type_info(type_info) click to toggle source
# File lib/gobject-introspection/type-tag.rb, line 133
def get_element_type_info(type_info)
  type_info.get_param_type(0)
end
try_convert(type_info, value) click to toggle source
# File lib/gobject-introspection/type-tag.rb, line 115
def try_convert(type_info, value)
  value = Array.try_convert(value)
  return nil if value.nil?
  element_type_info = get_element_type_info(type_info)
  value.collect do |v|
    unless v.nil?
      v = element_type_info.try_convert(v)
      return nil if v.nil?
    end
    v
  end
end