Sha256: 9887bc842b02b60a93a28dad5c71e960ae19da84359a9a74fd7a298affd1b9f5
Contents?: true
Size: 450 Bytes
Versions: 8
Compression:
Stored size: 450 Bytes
Contents
module SolanaRuby module DataTypes class Sequence def initialize count, type @count = count @type = type end def serialize items items.map do |item| @type.serialize(item) end.flatten end def deserialize bytes @count.times.map do current_bytes = bytes.shift(@type.size) @type.deserialize(current_bytes) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems