lib/beats/beats_runner.rb
def normalize_for_split_option(song)
      songs_to_generate = {}

      if @options[:split]
        split_songs = song.split
        split_songs.each do |track_name, split_song|
          extension = File.extname(@output_file_name)
          file_name = File.dirname(@output_file_name) + "/" +
                      File.basename(@output_file_name, extension) + "-" + File.basename(track_name, extension) +
                      extension

          songs_to_generate[file_name] = split_song
        end
      else
        songs_to_generate[@output_file_name] = song
      end

      songs_to_generate
    end
# Returns a hash of file name => song object for each song that should go through the audio engine
Returns a hash of file name => song object for each song that should go through the audio engine
Returns a hash of file name = > song object for each song that should go through the audio engine
def normalize_for_split_option(song)
      songs_to_generate = {}
      if @options[:split]
        split_songs = song.split
        split_songs.each do |track_name, split_song|
          extension = File.extname(@output_file_name)
          file_name = File.dirname(@output_file_name) + "/" +
                      File.basename(@output_file_name, extension) + "-" + File.basename(track_name, extension) +
                      extension
          songs_to_generate[file_name] = split_song
        end
      else
        songs_to_generate[@output_file_name] = song
      end
      songs_to_generate
    end
def normalize_for_split_option ( song ) songs_to_generate = { } if @options [ :split ] split_songs = song . split split_songs . each do | track_name , split_song | extension = File . extname ( @output_file_name ) file_name = File . dirname ( @output_file_name ) + "/" + File . basename ( @output_file_name , extension ) + "-" + File . basename ( track_name , extension ) + extension songs_to_generate [ file_name ] = split_song end else songs_to_generate [ @output_file_name ] = song end songs_to_generate end
Returns a hash of file name => song object for each song that should go through the audio engine
Returns a hash of file name = > song object for each song that should go through the audio engine
song