Class: DBus::Data::Container
Overview
Contains one or more other values.
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
For containers, the type varies among instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#eql?(other) ⇒ Boolean
Hash key equality See ruby-doc.org/core-3.0.0/Object.html#method-i-eql-3F Stricter than #== (RSpec: eq), 1==1.0 but 1.eql(1.0)->false.
-
#exact_value ⇒ Object
Something that is, or contains, Base.
- #value ⇒ Object
Methods inherited from Base
#==, assert_type_matches_class, from_typed, #initialize, type_code
Constructor Details
This class inherits a constructor from DBus::Data::Base
Instance Attribute Details
#type ⇒ Object (readonly)
For containers, the type varies among instances
523 524 525 |
# File 'lib/dbus/data.rb', line 523 def type @type end |
Class Method Details
Instance Method Details
#eql?(other) ⇒ Boolean
Hash key equality See ruby-doc.org/core-3.0.0/Object.html#method-i-eql-3F Stricter than #== (RSpec: eq), 1==1.0 but 1.eql(1.0)->false
538 539 540 541 542 |
# File 'lib/dbus/data.rb', line 538 def eql?(other) return false unless other.class == self.class other.exact_value.eql?(exact_value) end |
#exact_value ⇒ Object
Returns something that is, or contains, Base. Er, this docs kinda sucks.
527 528 529 |
# File 'lib/dbus/data.rb', line 527 def exact_value @value end |
#value ⇒ Object
531 532 533 |
# File 'lib/dbus/data.rb', line 531 def value @value.map(&:value) end |