Method: EDL::List#spliced

Defined in:
lib/edl.rb

#splicedObject

Return the same EDL with neighbouring clips joined at cuts where applicable (if a clip is divided in two pieces it will be spliced). Most useful in combination with without_timewarps



120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/edl.rb', line 120

def spliced
  spliced_edl = each_with_object([]) do |cur, spliced|
    latest = spliced[-1]
    # Append to latest if splicable
    if latest && (latest.reel == cur.reel) && (cur.src_start_tc == (latest.src_end_tc + 1))
      latest.src_end_tc = cur.src_end_tc
      latest.rec_end_tc = cur.rec_end_tc
    else
      spliced << cur.dup
    end
  end
  self.class.new(spliced_edl)
end