Class: SaraKeys
Overview
The SaraKeys class extends Keys, adding keys common to all Saras.
Instance Method Summary collapse
-
#initialize ⇒ SaraKeys
constructor
TODO: the following is an example code snippit, please update it before use Public: Initializes Sara keys.
Constructor Details
#initialize ⇒ SaraKeys
TODO: the following is an example code snippit, please update it before use Public: Initializes Sara keys.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/keys/sara/sara_keys.rb', line 10 def initialize assign( # Renamed digits because an attribute name may not begin with a digit. :NUM_0 => '0', :NUM_1 => '1', :NUM_2 => '2', :NUM_3 => '3', :NUM_4 => '4', :NUM_5 => '5', :NUM_6 => '6', :NUM_7 => '7', :NUM_8 => '8', :NUM_9 => '9', # Renamed arrows so they are sorted together. This is consistent with the naming for "volume" and "channel". :ARROW_UP => 'up_arrow', :ARROW_DOWN => 'down_arrow', :ARROW_LEFT => 'left_arrow', :ARROW_RIGHT => 'right_arrow', :SELECT => 'select', :POWER => 'power', :VOLUME_UP => 'volume_up', :VOLUME_DOWN => 'volume_down', :CHANNEL_UP => 'channel_up', :CHANNEL_DOWN => 'channel_down', :MUTE => 'mute', :FAV => 'fav', :GUIDE => 'guide', :INFO => 'info', :LAST => 'last', :MENU => 'menu', :EXIT => 'exit', :FAST_FORWARD => 'fastforward', :REWIND => 'rewind', #:SETTINGS => 'settings', # on old remote, could be 'SET UP'? new remote, 'OPTIONS'? :DVR => 'list', :PLAY => 'play', :PAUSE => 'pause', # Renamed skip-back for readability. :SKIP_BACK => 'skipback', :RECORD => 'record', :PAGE_DOWN => 'page_down', :PAGE_UP => 'page_up', :ON_DEMAND => 'mod', # new remote doesn't have this :A => 'a', # new remote doesn't have this :B => 'b', # new remote doesn't have this :C => 'c', # new remote doesn't have this :D => 'd' # new remote doesn't have this ) end |