Class: RokuTv

Inherits:
Platform show all
Defined in:
lib/platform/roku_tv/roku_tv.rb

Overview

Adds to or modifies the platform with RokuTv-specific functionality.

Direct Known Subclasses

RokuTv1080, RokuTv720

Instance Attribute Summary

Attributes inherited from Platform

#id, #keys, #remotes, #roi, #screens

Instance Method Summary collapse

Methods inherited from Platform

#alt_parental_controls_pin, #app_version, #audio_level, #audio_level_left, #audio_level_right, #audio_present?, #capture_audio, #capture_frames, #capture_screen, #device_type_is?, #device_type_not?, #entitlements, #has_power?, #height, #high_def?, #ip_address, #is_generic?, #lock, #mac_address, #model, #name, #parental_controls_pin, #password, #platform, #power_cycle, #power_off, #power_on, #power_on?, #press_key, #record_audio, #record_video, #remote_type=, #remote_type_is?, #reset_video, #resolution, #save_last_screen_captured, #slot, #snmp_get, #snmp_set, #software_version, #stop_audio, #stop_video, #upload_screenshot, #username, #width

Constructor Details

#initialize(*args) ⇒ RokuTv

Public: Initializes an Roku TV device.



11
12
13
14
15
16
# File 'lib/platform/roku_tv/roku_tv.rb', line 11

def initialize(*args)
  super(*args)
  @screens = RokuTvScreens.new(self)
  @roi = RokuTvRois.new(self)
  set_keys(RokuTvKeys.new)
end

Instance Method Details

#init?Boolean

Public: Initializes the Roku TV and brings it to the Live TV screen.

Returns a Boolean true if the device was initialized, otherwise false.

Returns:

  • (Boolean)


21
22
23
24
25
26
27
28
29
30
31
# File 'lib/platform/roku_tv/roku_tv.rb', line 21

def init?
  super do
    logger.warn('INIT NOT IMPLEMENTED')
    true
    #screens.main_menu.navigate_to_samsungApps

    #2.times { press_key.ARROW_RIGHT(:sleep_time => 2.sec) }

    #press_key.ARROW_DOWN(:sleep_time => 2.sec)

    #press_key.SELECT

    #roi.text.livetv_text.wait_until_displayed?(25.sec)  # returns this

  end
end