Class: AmqpUtils::MessageFormatter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/amqp_utils/message_formatter.rb

Direct Known Subclasses

JSON, Message, Pretty

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.inherited(klass) ⇒ Object



20
21
22
# File 'lib/amqp_utils/message_formatter.rb', line 20

def self.inherited(klass)
  ::AmqpUtils::MessageFormatter.register_formatter(klass, klass.basename)
end

Instance Method Details

#generate(io, header, message) ⇒ Object

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/amqp_utils/message_formatter.rb', line 24

def generate(io, header, message)
  raise NotImplementedError, "#{self} does not know how to generate output"
end

#load(io) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/amqp_utils/message_formatter.rb', line 28

def load(io)
  raise NotImplementedError, "#{self} does not know how consume its output"
end