Class: Queuel::Serialization::Json::Encoder

Inherits:
Object
  • Object
show all
Defined in:
lib/queuel/serialization/json.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ Encoder

Returns a new instance of Encoder.



27
28
29
# File 'lib/queuel/serialization/json.rb', line 27

def initialize(body)
  @body = body
end

Class Method Details

.call(body) ⇒ Object



23
24
25
# File 'lib/queuel/serialization/json.rb', line 23

def self.call(body)
  new(body).encode
end

Instance Method Details

#encodeObject



31
32
33
# File 'lib/queuel/serialization/json.rb', line 31

def encode
  MultiJson.dump @body
end