Class: DVRB::Tivo
Constant Summary collapse
- PORT =
31339
Instance Attribute Summary collapse
-
#tivo ⇒ Object
TiVo specific functions.
Attributes inherited from Base
Instance Method Summary collapse
-
#channel(num) ⇒ Object
Changes the channel.
-
#channel_down ⇒ Object
Channel down.
-
#channel_up ⇒ Object
Channel up.
- #down ⇒ Object
-
#initialize(host) ⇒ Tivo
constructor
A new instance of Tivo.
- #left ⇒ Object
- #live_tv ⇒ Object
- #now_showing ⇒ Object
-
#number(num) ⇒ Object
Input a number.
-
#pause ⇒ Object
Pause.
-
#play ⇒ Object
Play.
-
#record ⇒ Object
Starts recording the current channel.
- #right ⇒ Object
- #select ⇒ Object
- #thumbs_down ⇒ Object
- #thumbs_up ⇒ Object
- #up ⇒ Object
Constructor Details
#initialize(host) ⇒ Tivo
Returns a new instance of Tivo.
7 8 9 |
# File 'lib/dvrb/tivo.rb', line 7 def initialize(host) @host = host end |
Instance Attribute Details
#tivo ⇒ Object
TiVo specific functions
67 68 69 |
# File 'lib/dvrb/tivo.rb', line 67 def tivo @tivo end |
Instance Method Details
#channel(num) ⇒ Object
Changes the channel
46 47 48 |
# File 'lib/dvrb/tivo.rb', line 46 def channel(num) num.to_s.split("").each { |n| number(n) } end |
#channel_down ⇒ Object
Channel down
32 33 34 |
# File 'lib/dvrb/tivo.rb', line 32 def channel_down remote "CHANNELDOWN" end |
#channel_up ⇒ Object
Channel up
27 28 29 |
# File 'lib/dvrb/tivo.rb', line 27 def channel_up remote "CHANNELUP" end |
#down ⇒ Object
54 55 56 |
# File 'lib/dvrb/tivo.rb', line 54 def down remote "DOWN" end |
#left ⇒ Object
58 59 60 |
# File 'lib/dvrb/tivo.rb', line 58 def left remote "LEFT" end |
#live_tv ⇒ Object
79 80 81 |
# File 'lib/dvrb/tivo.rb', line 79 def live_tv remote "LIVETV" end |
#now_showing ⇒ Object
83 84 85 |
# File 'lib/dvrb/tivo.rb', line 83 def now_showing remote "NOWSHOWING" end |
#number(num) ⇒ Object
Input a number
41 42 43 |
# File 'lib/dvrb/tivo.rb', line 41 def number(num) remote "NUM#{num}" end |
#pause ⇒ Object
Pause
17 18 19 |
# File 'lib/dvrb/tivo.rb', line 17 def pause remote "PAUSE" end |
#play ⇒ Object
Play
12 13 14 |
# File 'lib/dvrb/tivo.rb', line 12 def play remote "PLAY" end |
#record ⇒ Object
Starts recording the current channel
22 23 24 |
# File 'lib/dvrb/tivo.rb', line 22 def record remote "RECORD", "SELECT" end |
#right ⇒ Object
62 63 64 |
# File 'lib/dvrb/tivo.rb', line 62 def right remote "RIGHT" end |
#select ⇒ Object
36 37 38 |
# File 'lib/dvrb/tivo.rb', line 36 def select remote "SELECT" end |
#thumbs_down ⇒ Object
75 76 77 |
# File 'lib/dvrb/tivo.rb', line 75 def thumbs_down remote "THUMBSDOWN" end |
#thumbs_up ⇒ Object
71 72 73 |
# File 'lib/dvrb/tivo.rb', line 71 def thumbs_up remote "THUMBSUP" end |
#up ⇒ Object
50 51 52 |
# File 'lib/dvrb/tivo.rb', line 50 def up remote "UP" end |