Class: Pantry::Communication::SerializeMessage::FromZeromq
- Inherits:
-
Object
- Object
- Pantry::Communication::SerializeMessage::FromZeromq
- Defined in:
- lib/pantry/communication/serialize_message.rb
Instance Method Summary collapse
-
#initialize(parts) ⇒ FromZeromq
constructor
A new instance of FromZeromq.
- #perform ⇒ Object
Constructor Details
#initialize(parts) ⇒ FromZeromq
Returns a new instance of FromZeromq.
56 57 58 |
# File 'lib/pantry/communication/serialize_message.rb', line 56 def initialize(parts) @parts = parts end |
Instance Method Details
#perform ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/pantry/communication/serialize_message.rb', line 60 def perform Pantry::Message.new.tap do || . = JSON.parse(@parts[1], symbolize_names: true) .to = @parts[0] .body = parse_body_parts(@parts[2..-1]) end end |