Class: EDL::FallbackMatcher
Overview
Fallback matcher for things like FINAL CUT PRO REEL
Instance Method Summary collapse
- #apply(stack, line) ⇒ Object
-
#initialize ⇒ FallbackMatcher
constructor
A new instance of FallbackMatcher.
Methods inherited from Matcher
Constructor Details
#initialize ⇒ FallbackMatcher
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 |