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.


173
174
175
# File 'lib/edl.rb', line 173

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

Instance Method Details

#apply(stack, line) ⇒ Object


177
178
179
180
181
# File 'lib/edl.rb', line 177

def apply(stack, line)
  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