Class: EDL::NameMatcher

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

Overview

Clip name matcher

Instance Method Summary collapse

Methods inherited from Matcher

#matches?

Constructor Details

#initializeNameMatcher

Returns a new instance of NameMatcher.



184
185
186
# File 'lib/edl.rb', line 184

def initialize
  super(/\*\s*FROM CLIP NAME:(\s+)(.+)/)
end

Instance Method Details

#apply(stack, line) ⇒ Object



188
189
190
191
# File 'lib/edl.rb', line 188

def apply(stack, line)
  stack[-1].clip_name = line.scan(@regexp).flatten.pop.strip
  CommentMatcher.new.apply(stack, line)
end