Sha256: d541a8d3136fd3b38d57bb23ca22bc7e0089b9f1b6963f70750525735b108cf0
Contents?: true
Size: 360 Bytes
Versions: 21
Compression:
Stored size: 360 Bytes
Contents
class BlacklistPattern < ActiveRecord::Base end class RegexPattern < BlacklistPattern def matches?(string) string.match(/#{pattern}/) end def to_s "Regex /#{pattern}/" end end class StringPattern < BlacklistPattern def matches?(string) string.match(/\b#{Regexp.quote(pattern)}\b/) end def to_s "String '#{pattern}'" end end
Version data entries
21 entries across 21 versions & 1 rubygems