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


186
187
188
# File 'lib/edl.rb', line 186

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

Instance Method Details

#apply(stack, line) ⇒ Object


190
191
192
193
# File 'lib/edl.rb', line 190

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