CBOR::Encoder
Inherits Reference / Object
Constructors
new(io : IO = IO::Memory.new, &)
Sourcenew(io : IO = IO::Memory.new)
SourceInstance methods
object
Sourceto_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
to_slice
Sourcewrite(value : Nil | Nil.class, use_undefined : Bool = false)
Sourcewrite(value : Bool)
Sourcewrite(value : String)
Sourcewrite(value : Bytes)
Sourcewrite(value : Symbol)
Sourcewrite(value : Float32 | Float64)
Sourcewrite(value : Int8 | Int16 | Int32 | Int64)
Sourcewrite(value : UInt8 | UInt16 | UInt32 | UInt64, offset : UInt8 = 0)
Sourcewrite(value : SimpleValue)
Sourcewrite(tag : Tag)
Sourcewrite_array_start(size)
Sourcewrite_object_start(size)
Source