Sha256: 19f33ead5c1555707b0c933ac3b46bf5a17888152711aad1a1e82d5ab6168ce0
Contents?: true
Size: 416 Bytes
Versions: 16
Compression:
Stored size: 416 Bytes
Contents
# frozen_string_literal: true module Paquito class CoderChain def initialize(*coders) @coders = coders.flatten.map { |c| Paquito.cast(c) } end def dump(object) payload = object @coders.each { |c| payload = c.dump(payload) } payload end def load(payload) object = payload @coders.reverse_each { |c| object = c.load(object) } object end end end
Version data entries
16 entries across 16 versions & 1 rubygems