Class: File

Inherits:
Object show all
Defined in:
lib/qualitysmith_extensions/file/exact_match_regexp.rb

Overview

To do:

  • Is there a more object-oriented way to do this? Instance method instead of class method?

Class Method Summary collapse

Class Method Details

.exact_match_regexp(filename) ⇒ Object



12
13
14
# File 'lib/qualitysmith_extensions/file/exact_match_regexp.rb', line 12

def self.exact_match_regexp(filename)
  /(^|\/)#{Regexp.escape(filename)}$/
end