class
TLV::PathContainer
- TLV::PathContainer
- Reference
- Object
Overview
PathContainer is a wrapper around a hash that preserves the PATH container type during encode/decode cycles. This is necessary because PATH (0x17) and STRUCTURE (0x15) containers have different semantics in the Matter protocol, but both decode to hashes. PATH containers contain tagged elements (endpoint, cluster, attribute) like structures.
Defined in:
tlv/path_container.crConstructors
Instance Method Summary
- #==(other : Hash(Tag, Value))
- #==(other : PathContainer)
- #[](key : Tag)
- #[]=(key : Tag, value : Value)
- #[]?(key : Tag)
- #each(&)
- #elements : Hash(Tag, Value)
- #empty?
- #has_key?(key : Tag)
-
#inspect(io : IO)
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
- #keys
- #map(&block)
- #size
- #to_h : Hash(String | {Int32?, Int32} | UInt8 | Nil, TLV::Value)
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #values
Constructor Detail
Instance Method Detail
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>