Sha256: 31ad13c084fb43c4f3f2f0dca03969ac5fd44d84001682942988c8e91cfde79b

Contents?: true

Size: 486 Bytes

Versions: 6

Compression:

Stored size: 486 Bytes

Contents

module ASIR
  # !SLIDE
  # Coder
  #
  # Define encoding and decoding for Messages and Results along a Transport.
  class Coder
    include Log, Initialization

    def encode obj
      _encode obj
    end

    def decode obj
      obj and _decode obj
    end

    # Coder subclasses:
    def _subclass_responsibility *args
      raise "subclass responsibility"
    end
    alias :_encode :_subclass_responsibility
    alias :_decode :_subclass_responsibility
  end
  # !SLIDE END
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asir-1.0.7 lib/asir/coder.rb
asir-1.0.6 lib/asir/coder.rb
asir-1.0.5 lib/asir/coder.rb
asir-1.0.4 lib/asir/coder.rb
asir-1.0.1 lib/asir/coder.rb
asir-0.2.0 lib/asir/coder.rb