Class: EDL::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/edl.rb

Overview

A generic matcher

Defined Under Namespace

Classes: ApplyError

Instance Method Summary collapse

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

Returns:

  • (Boolean)


145
146
147
# File 'lib/edl.rb', line 145

def matches?(line)
  !!(line =~ @regexp)
end