Module: Protojson::Codec::CodecInterface

Included in:
Binary, Hash, Json, JsonIndexed, JsonTagMap
Defined in:
lib/protojson/codec/codec_interface.rb

Instance Method Summary collapse

Instance Method Details

#decode(message, data) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/protojson/codec/codec_interface.rb', line 9

def decode(message, data)
  raise NotImplementedError, "#{self.class} should implement decode method"
end

#encode(message) ⇒ Object

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/protojson/codec/codec_interface.rb', line 5

def encode(message)
  raise NotImplementedError, "#{self.class} should implement encode method"
end