module Comandante::Helper
Overview
Some helper functions
Defined in:
lib/comandante/src/comandante/helper.crcomandante/msgpack.cr
Class Method Summary
-
.read_msgpack(file, data)
Reads data from file - first/only object in file
-
.read_msgpack(file, data, &) : Nil
- Asserts file exists - Raises MessagePack::TypeCastError if not the correct type
-
.write_msgpack(data, file, mode = "w") : Nil
Writes serializable data to file
Class Method Detail
def self.read_msgpack(file, data)
#
Reads data from file - first/only object in file
- Asserts file exists
- Raises
MessagePack::EofError
if file is empty - Raises MessagePack::TypeCastError if not the correct type
NOTE you pass an object of the desired type
def self.read_msgpack(file, data, &) : Nil
#
- Asserts file exists
- Raises MessagePack::TypeCastError if not the correct type
NOTE you pass an object of the desired type