class Fourtrack::RotatingRecorder

Can be used the same as a Recorder, but it will output path as the format argument for `Time#strftime`

Public Class Methods

new(output_pattern:, **options_for_recorder) click to toggle source
Calls superclass method Fourtrack::Recorder::new
# File lib/fourtrack/rotating_recorder.rb, line 4
def initialize(output_pattern:, **options_for_recorder)
  @output_path_pattern = output_pattern
  first_file_path = Time.now.utc.strftime(@output_path_pattern)
  super(output_path: first_file_path, **options_for_recorder)
end

Private Instance Methods

output_path() click to toggle source
# File lib/fourtrack/rotating_recorder.rb, line 12
def output_path
  Time.now.utc.strftime(@output_path_pattern)
end