class Shaf::Command::Test::Filter
Constants
- None
Attributes
lines[R]
pattern[R]
Public Class Methods
new(criteria)
click to toggle source
# File lib/shaf/command/test/filter.rb, line 9 def initialize(criteria) pattern, *lines = criteria.split(':') @lines = lines.map(&:to_i) @pattern = Regexp.new(pattern) end
Public Instance Methods
match?(file)
click to toggle source
# File lib/shaf/command/test/filter.rb, line 15 def match?(file) pattern.match? file end