lib/middleware/base.rb in tracksperanto-2.1.0 vs lib/middleware/base.rb in tracksperanto-2.1.1

- old
+ new

@@ -18,31 +18,11 @@ def initialize(*exporter_and_args_for_block_init) @exporter = exporter_and_args_for_block_init.shift super end - # Called on export start - def start_export( img_width, img_height) - @exporter.start_export(img_width, img_height) + %w( start_export start_tracker_segment end_tracker_segment + export_point end_export).each do | m | + define_method(m){|*a| @exporter.send(m, *a)} end - - # Called on export end - def end_export - @exporter.end_export - end - - # Called on tracker start, one for each tracker. Start of the next tracker - # signifies that the previous tracker has passed by - def start_tracker_segment(tracker_name) - @exporter.start_tracker_segment(tracker_name) - end - - # Called on tracker end - def end_tracker_segment - @exporter.end_tracker_segment - end - - # Called for each tracker keyframe - def export_point(at_frame_i, abs_float_x, abs_float_y, float_residual) - @exporter.export_point(at_frame_i, abs_float_x, abs_float_y, float_residual) - end -end \ No newline at end of file + +end