Module: CBOR::Packed::Object_Packed_CBOR
- Defined in:
- lib/cbor-packed.rb
Instance Method Summary collapse
- #cbor_visit {|_self| ... } ⇒ Object
- #to_packed_cbor(packer = Packer.from_item(self)) ⇒ Object
- #to_packed_cbor1(packer = Packer.from_item(self)) ⇒ Object
- #to_unpacked_cbor1(unpacker) ⇒ Object
Instance Method Details
#cbor_visit {|_self| ... } ⇒ Object
367 368 369 |
# File 'lib/cbor-packed.rb', line 367 def cbor_visit yield self end |
#to_packed_cbor(packer = Packer.from_item(self)) ⇒ Object
373 374 375 |
# File 'lib/cbor-packed.rb', line 373 def to_packed_cbor(packer = Packer.from_item(self)) packer.pack(to_packed_cbor1(packer)) end |
#to_packed_cbor1(packer = Packer.from_item(self)) ⇒ Object
376 377 378 379 380 381 382 383 |
# File 'lib/cbor-packed.rb', line 376 def to_packed_cbor1(packer = Packer.from_item(self)) if c = packer.has(self) c else # Need to do the prefix dance, too self end end |
#to_unpacked_cbor1(unpacker) ⇒ Object
370 371 372 |
# File 'lib/cbor-packed.rb', line 370 def to_unpacked_cbor1(unpacker) self end |