Class: Sonic::Channels::Base
- Inherits:
-
Object
- Object
- Sonic::Channels::Base
- Defined in:
- lib/sonic/channels/base.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #help(manual) ⇒ Object
-
#initialize(connection) ⇒ Base
constructor
A new instance of Base.
- #ping ⇒ Object
- #quit ⇒ Object
Constructor Details
#initialize(connection) ⇒ Base
6 7 8 |
# File 'lib/sonic/channels/base.rb', line 6 def initialize(connection) @connection = connection end |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
4 5 6 |
# File 'lib/sonic/channels/base.rb', line 4 def connection @connection end |
Instance Method Details
#help(manual) ⇒ Object
14 15 16 |
# File 'lib/sonic/channels/base.rb', line 14 def help(manual) execute('HELP', manual) end |
#ping ⇒ Object
10 11 12 |
# File 'lib/sonic/channels/base.rb', line 10 def ping execute('PING') end |
#quit ⇒ Object
18 19 20 21 |
# File 'lib/sonic/channels/base.rb', line 18 def quit execute('QUIT') connection.disconnect end |