Sha256: ff2cb2bd7342006eb3bcb9f1ca804ec356d2d1203140132db30a83d5eef68c79

Contents?: true

Size: 316 Bytes

Versions: 6

Compression:

Stored size: 316 Bytes

Contents

require 'asir/coder'

module ASIR
  class Coder
    # !SLIDE
    # Null Coder
    # Always encode/decode as nil.
    class Null < self
      def _encode obj
        nil
      end

      def _decode obj
        nil
      end

      # Completely stateless.
      def dup; self; end
    end
    # !SLIDE END
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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