Sha256: 5163f14da710b1adb7ceca866b323024a24b0dc07ef131b30bd05661b2b38c95
Contents?: true
Size: 552 Bytes
Versions: 31
Compression:
Stored size: 552 Bytes
Contents
module ASIR class Coder # !SLIDE # Chain Coder # Chain multiple Coders as one. # # @@@ text # message --> | e1 | --> | e2 | --> | eN | --> # result <-- | d1 | <-- | d2 | <-- | dN | <-- # @@@ class Chain < self attr_accessor :encoders def _encode obj encoders.each do | e | obj = e.dup.encode(obj) end obj end def _decode obj encoders.reverse_each do | e | obj = e.dup.decode(obj) end obj end end end end
Version data entries
31 entries across 31 versions & 1 rubygems