Class: DBus::Data::Signature
Overview
Signature string, zero or more single complete types. See also Type
Instance Attribute Summary
Attributes inherited from Base
#value
Class Method Summary
collapse
Methods inherited from StringLike
fixed?, #initialize
Methods inherited from Basic
basic?, from_typed, type, #type
Methods inherited from Base
#==, assert_type_matches_class, basic?, #eql?, fixed?, from_typed, #initialize, #type
Class Method Details
.alignment ⇒ Object
486
487
488
|
# File 'lib/dbus/data.rb', line 486
def self.alignment
1
end
|
.from_raw(value, mode:) ⇒ Object
501
502
503
504
505
506
507
508
|
# File 'lib/dbus/data.rb', line 501
def self.from_raw(value, mode:)
if mode == :plain
_types = validate_raw!(value)
return value
end
new(value)
end
|
.size_class ⇒ Object
490
491
492
|
# File 'lib/dbus/data.rb', line 490
def self.size_class
Byte
end
|
.type_code ⇒ Object
482
483
484
|
# File 'lib/dbus/data.rb', line 482
def self.type_code
"g"
end
|
.validate_raw!(value) ⇒ ::Array<Type>
495
496
497
498
499
|
# File 'lib/dbus/data.rb', line 495
def self.validate_raw!(value)
DBus.types(value)
rescue Type::SignatureException => e
raise InvalidPacketException, "Invalid signature: #{e.message}"
end
|