Module: RCheck::Filters

Defined in:
lib/rcheck/filters.rb

Defined Under Namespace

Modules: Anti

Constant Summary collapse

InstalledGems =
port_regex('/lib\d*/ruby/')
Executables =
port_regex('bin/')
Rcheck =
port_regex('lib/rcheck')
Jruby =
port_regex('org/jruby/')

Class Method Summary collapse

Class Method Details

.gem(name) ⇒ Object



12
13
14
15
# File 'lib/rcheck/filters.rb', line 12

def self.gem(name)
  sep = File::SEPARATOR
  /#{sep}#{name}(-[^#{sep}]+)?#{sep}/
end

.port_regex(str) ⇒ Object



3
4
5
# File 'lib/rcheck/filters.rb', line 3

def self.port_regex(str)
  Regexp.new(str.gsub("/", File::SEPARATOR))
end