Class: Linda::SocketIO::Client::Client
- Inherits:
-
Object
- Object
- Linda::SocketIO::Client::Client
- Defined in:
- lib/linda-socket.io-client/client.rb
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
-
#initialize(url_or_io) ⇒ Client
constructor
A new instance of Client.
- #tuplespace(name) ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(url_or_io) ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 21 22 |
# File 'lib/linda-socket.io-client/client.rb', line 16 def initialize(url_or_io) if url_or_io.kind_of? String @io = ::SocketIO::Client::Simple.connect url_or_io elsif url_or_io.kind_of? ::SocketIO::Client::Simple::Client @io = url_or_io end end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
14 15 16 |
# File 'lib/linda-socket.io-client/client.rb', line 14 def io @io end |
Instance Method Details
#tuplespace(name) ⇒ Object
24 25 26 |
# File 'lib/linda-socket.io-client/client.rb', line 24 def tuplespace(name) TupleSpace.new(self, name.to_s) end |
#url ⇒ Object
28 29 30 |
# File 'lib/linda-socket.io-client/client.rb', line 28 def url @io.url end |