Sha256: 3ae67f41c51ff6f4e5224ceb5607b51aebb645f4dda514df31a60c7d88bbb973

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

module Kamerling class Receiver
  def receive addr: req(:addr), client_uuid: req(:client_uuid),
              data: req(:data), repos: Repos, task_uuid: req(:task_uuid)
    client = repos[Client][client_uuid]
    task   = repos[Task][task_uuid]
    result = Result.new addr: addr, client: client, data: data, task: task
    client.busy = false
    task.done   = true
    repos << result << client << task
  end
end end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kamerling-0.0.2 lib/kamerling/receiver.rb
kamerling-0.0.1 lib/kamerling/receiver.rb