Class: Floom::Client
- Inherits:
-
Object
- Object
- Floom::Client
- Defined in:
- lib/floom/client.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #reset_connection! ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
6 7 8 9 10 |
# File 'lib/floom/client.rb', line 6 def initialize( = {}) @host = [:host] @port = [:port] establish_connection! end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
4 5 6 |
# File 'lib/floom/client.rb', line 4 def connection @connection end |
Instance Method Details
#reset_connection! ⇒ Object
16 17 18 19 |
# File 'lib/floom/client.rb', line 16 def reset_connection! @socket = @transport = @protocol = @connection = nil establish_connection! end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/floom/client.rb', line 12 def to_s "#<#{self.class}:#{object_id} host:#{@host} port:#{@port}>" end |