Module: PikaQue::Codecs::RAILS

Extended by:
RAILS
Included in:
RAILS
Defined in:
lib/pika_que/codecs/rails.rb

Instance Method Summary collapse

Instance Method Details

#content_typeObject



16
17
18
# File 'lib/pika_que/codecs/rails.rb', line 16

def content_type
  'application/json'
end

#decode(payload) ⇒ Object



12
13
14
# File 'lib/pika_que/codecs/rails.rb', line 12

def decode(payload)
  ::ActiveSupport::JSON.decode(payload)
end

#encode(payload) ⇒ Object



8
9
10
# File 'lib/pika_que/codecs/rails.rb', line 8

def encode(payload)
  ::ActiveSupport::JSON.encode(payload)
end