Class: DBus::Data::Signature
- Inherits:
-
StringLike
- Object
- Base
- Basic
- StringLike
- DBus::Data::Signature
- Defined in:
- lib/dbus/data.rb
Overview
Signature string, zero or more single complete types. See also Type
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
- .alignment ⇒ Object
- .from_raw(value, mode:) ⇒ Object
- .size_class ⇒ Object
- .type_code ⇒ Object
- .validate_raw!(value) ⇒ ::Array<Type>
Methods inherited from StringLike
Methods inherited from Basic
basic?, from_typed, type, #type
Methods inherited from Base
#==, assert_type_matches_class, basic?, #eql?, fixed?, from_typed, #initialize, #type
Constructor Details
This class inherits a constructor from DBus::Data::StringLike
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 |
.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.}" end |