Class: Resque::Coder

Inherits:
Object
  • Object
show all
Defined in:
lib/resque/coder.rb

Direct Known Subclasses

MultiJsonCoder

Instance Method Summary collapse

Instance Method Details

#decode(object) ⇒ Object

Given a string, returns a Ruby object.

Raises:



18
19
20
# File 'lib/resque/coder.rb', line 18

def decode(object)
  raise DecodeException
end

#dump(object) ⇒ Object

alias for encode



13
14
15
# File 'lib/resque/coder.rb', line 13

def dump(object)
  encode(object)
end

#encode(object) ⇒ Object

Given a Ruby object, returns a string suitable for storage in a queue.

Raises:



8
9
10
# File 'lib/resque/coder.rb', line 8

def encode(object)
  raise EncodeException
end

#load(object) ⇒ Object

alias for decode



23
24
25
# File 'lib/resque/coder.rb', line 23

def load(object)
  decode(object)
end