class EM::RocketIO::Linda::Client

Constants

VERSION

Attributes

io[R]
tuplespace[R]

Public Class Methods

new(io_or_url) click to toggle source
# File lib/em-rocketio-linda-client/client.rb, line 13
def initialize(io_or_url)
  if io_or_url.kind_of? String and io_or_url =~ /^https*:\/\/.+$/
    @io = ::EM::RocketIO::Client.new(io_or_url).connect
  elsif io_or_url.kind_of? ::EM::RocketIO::Client
    @io = io_or_url
  else
    raise ArgumentError, "argument must be URL or EM::RocketIO::Client"
  end
  @tuplespace = Hash.new{|h,k|
    h[k] = EM::RocketIO::Linda::Client::TupleSpace.new(k, self)
  }
end