Class: Lava::FrameCompare
- Inherits:
-
Object
- Object
- Lava::FrameCompare
- Defined in:
- lib/lava/frame_compare.rb
Class Method Summary collapse
-
.start_session(args) ⇒ Object
Initialize a frame comparison session Takes a number of args: * name (optional) – name for the session * dir (optional) – directory to store frame captures * frame_capture (required) – lambda for performing a frame capture The lambda should take a single argument, filename: capture_frame = ->(filename) { code_to_perform_frame_capture( :save_to => filename ) }.
Class Method Details
.start_session(args) ⇒ Object
Initialize a frame comparison session Takes a number of args:
-
name (optional) – name for the session
-
dir (optional) – directory to store frame captures
-
frame_capture (required) – lambda for performing a frame capture
The lambda should take a single argument, filename:
capture_frame = ->(filename) {
code_to_perform_frame_capture( :save_to => filename )
}
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lava/frame_compare.rb', line 17 def self.start_session( args ) raise "frame_capture lambda function required" if !args[:frame_capture] || args[:capture] Lava::Session.new( :name => args[:name], :frame_capture => args[:frame_capture] || args[:capture], :dir => args[:dir], :audio_sampler => args[:audio_sampler] ) end |