Class: Chromecast::Channel::Connection
- Defined in:
- lib/chromecast/channel/connection.rb
Constant Summary collapse
- NAMESPACE =
'urn:x-cast:com.google.cast.tp.connection'
Instance Attribute Summary
Attributes inherited from Base
#connection, #namespace, #type
Instance Method Summary collapse
- #close ⇒ Object
- #connect ⇒ Object
-
#initialize(connection) ⇒ Connection
constructor
A new instance of Connection.
Methods inherited from Base
Constructor Details
#initialize(connection) ⇒ Connection
Returns a new instance of Connection.
6 7 8 |
# File 'lib/chromecast/channel/connection.rb', line 6 def initialize connection super(connection, NAMESPACE, :json) end |
Instance Method Details
#close ⇒ Object
14 15 16 |
# File 'lib/chromecast/channel/connection.rb', line 14 def close send(type: 'CLOSE') end |
#connect ⇒ Object
10 11 12 |
# File 'lib/chromecast/channel/connection.rb', line 10 def connect send(type: 'CONNECT') end |