Class: MobyUtil::TDriverCam
Overview
Base class and interface for camera recorders in TDriver
Class Method Summary collapse
-
.new_cam(*args) ⇒ Object
Automatically select the right kind of camera implementation for the detected platform.
Instance Method Summary collapse
-
#initialize ⇒ TDriverCam
constructor
A new instance of TDriverCam.
- #start_recording ⇒ Object
- #stop_recording ⇒ Object
Constructor Details
#initialize ⇒ TDriverCam
Returns a new instance of TDriverCam.
44 45 46 47 48 |
# File 'lib/tdriver/util/video/camera.rb', line 44 def initialize raise RuntimeError.new("TDriverCam abstract class") end |
Class Method Details
.new_cam(*args) ⇒ Object
Automatically select the right kind of camera implementation for the detected platform.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/tdriver/util/video/camera.rb', line 26 def self.new_cam( *args ) if EnvironmentHelper.windows? MobyUtil::TDriverWinCam.new( *args ) elsif EnvironmentHelper.linux? MobyUtil::TDriverLinuxCam.new( *args ) else raise RuntimeError.new("Unidentified platform type, unable to select platform specific camera. Supported platform types: Linux, Windows.") end end |
Instance Method Details
#start_recording ⇒ Object
50 51 52 53 54 |
# File 'lib/tdriver/util/video/camera.rb', line 50 def start_recording raise RuntimeError.new("TDriverCam abstract class") end |
#stop_recording ⇒ Object
56 57 58 59 60 |
# File 'lib/tdriver/util/video/camera.rb', line 56 def stop_recording raise RuntimeError.new("TDriverCam abstract class") end |