class Subledger::Actor

Constants

BOOK_ID
CLIENT_HASH
ORG_ID

Private Instance Methods

client_for(args) click to toggle source
# File lib/subledger/actor.rb, line 21
def client_for args
  client_hash = args[CLIENT_HASH]

  Subledger.new :org_id  => client_hash[ORG_ID],
                :book_id => client_hash[BOOK_ID]
end
worker(type) click to toggle source
# File lib/subledger/actor.rb, line 7
def worker type
  worker_actor = nil

  while ( worker_actor = Celluloid::Actor[ type ] ).nil?
    sleep 0.1
  end

  worker_actor
end