Class: FingerPoken::Target::Tivo::TivoClient
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- FingerPoken::Target::Tivo::TivoClient
- Defined in:
- lib/fingerpoken/tivo.rb
Instance Method Summary collapse
- #connection_completed ⇒ Object
-
#initialize(target) ⇒ TivoClient
constructor
A new instance of TivoClient.
- #receive_data(data) ⇒ Object
- #send_data(data) ⇒ Object
Constructor Details
#initialize(target) ⇒ TivoClient
Returns a new instance of TivoClient.
96 97 98 99 |
# File 'lib/fingerpoken/tivo.rb', line 96 def initialize(target) puts "init #{self} / #{target}" @target = target end |
Instance Method Details
#connection_completed ⇒ Object
101 102 103 104 |
# File 'lib/fingerpoken/tivo.rb', line 101 def connection_completed @target.register puts "Ready" end |
#receive_data(data) ⇒ Object
106 107 108 |
# File 'lib/fingerpoken/tivo.rb', line 106 def receive_data(data) p "Tivo says: #{data}" end |
#send_data(data) ⇒ Object
110 111 112 113 |
# File 'lib/fingerpoken/tivo.rb', line 110 def send_data(data) puts "Sending: #{data}" super(data) end |