Class: GVariantVariantType

Inherits:
GVariantBasicType show all
Defined in:
lib/gvariant.rb

Instance Attribute Summary

Attributes inherited from GVariantBasicType

#alignment, #default_value, #fixed_size, #id

Instance Method Summary collapse

Methods inherited from GVariantBasicType

#align

Constructor Details

#initializeGVariantVariantType

Returns a new instance of GVariantVariantType.



112
113
114
# File 'lib/gvariant.rb', line 112

def initialize
  super('v', nil, 8, nil, { type: '()', value: {} })
end

Instance Method Details

#read(buf) ⇒ Object



116
117
118
119
# File 'lib/gvariant.rb', line 116

def read(buf)
  value, sep, type = buf[0..buf.length - 1].rpartition("\x00")
  { type: type, value: GVariant.read(type, value) }
end