Class: EDL::Matcher
- Inherits:
-
Object
- Object
- EDL::Matcher
- Defined in:
- lib/edl.rb
Overview
A generic matcher
Direct Known Subclasses
CommentMatcher, EffectMatcher, EventMatcher, FallbackMatcher, NameMatcher, TimewarpMatcher
Defined Under Namespace
Classes: ApplyError
Instance Method Summary collapse
- #apply(stack, line) ⇒ Object
-
#initialize(with_regexp) ⇒ Matcher
constructor
A new instance of Matcher.
- #matches?(line) ⇒ Boolean
Constructor Details
#initialize(with_regexp) ⇒ Matcher
Returns a new instance of Matcher.
141 142 143 |
# File 'lib/edl.rb', line 141 def initialize(with_regexp) @regexp = with_regexp end |
Instance Method Details
#apply(stack, line) ⇒ Object
149 150 151 |
# File 'lib/edl.rb', line 149 def apply(stack, line) STDERR.puts "Skipping #{line}" end |
#matches?(line) ⇒ Boolean
145 146 147 |
# File 'lib/edl.rb', line 145 def matches?(line) !!(line =~ @regexp) end |