Class: Sonic::Client
- Inherits:
-
Object
- Object
- Sonic::Client
- Defined in:
- lib/sonic/client.rb
Instance Method Summary collapse
- #channel(type) ⇒ Object
-
#initialize(host, port, password = nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(host, port, password = nil) ⇒ Client
Returns a new instance of Client.
3 4 5 6 7 |
# File 'lib/sonic/client.rb', line 3 def initialize(host, port, password = nil) @host = host @port = port @password = password end |
Instance Method Details
#channel(type) ⇒ Object
9 10 11 |
# File 'lib/sonic/client.rb', line 9 def channel(type) channel_class(type).new(Connection.connect(@host, @port, type, @password)) end |