Class: FingerPoken::Target::Tivo::TivoClient

Inherits:
EventMachine::Connection
  • Object
show all
Defined in:
lib/fingerpoken/tivo.rb

Instance Method Summary collapse

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_completedObject



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