Class: GVariantBooleanType

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

#initializeGVariantBooleanType

Returns a new instance of GVariantBooleanType.



68
69
70
# File 'lib/gvariant.rb', line 68

def initialize
  super('b', 'C', 1, 1, false)
end

Instance Method Details

#read(buf) ⇒ Object



72
73
74
75
# File 'lib/gvariant.rb', line 72

def read(buf)
  b = super(buf)
  b != false && b != 0
end