Class: EDL::FallbackMatcher

Inherits:
Matcher
  • Object
show all
Defined in:
lib/edl.rb

Overview

Fallback matcher for things like FINAL CUT PRO REEL

Instance Method Summary collapse

Methods inherited from Matcher

#matches?

Constructor Details

#initializeFallbackMatcher

Returns a new instance of FallbackMatcher.



169
170
171
# File 'lib/edl.rb', line 169

def initialize
  super(/^(\w)(.+)/)
end

Instance Method Details

#apply(stack, line) ⇒ Object



173
174
175
176
177
178
179
# File 'lib/edl.rb', line 173

def apply(stack, line)
  begin
    stack[-1].comments << line.scan(@regexp).flatten.join.strip
  rescue NoMethodError 
    raise ApplyError.new("Line can only be a comment but no event was on the stack", line)
  end
end