Class: Queuel::Serialization::Json::Encoder
- Inherits:
-
Object
- Object
- Queuel::Serialization::Json::Encoder
- Defined in:
- lib/queuel/serialization/json.rb
Class Method Summary collapse
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(body) ⇒ Encoder
constructor
A new instance of Encoder.
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
#encode ⇒ Object
31 32 33 |
# File 'lib/queuel/serialization/json.rb', line 31 def encode MultiJson.dump @body end |