Class: Downgrade::Path

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.regexpsObject



7
8
9
# File 'lib/downgrade/path.rb', line 7

def regexps
  @regexps ||= []
end

Class Method Details

.hit_regexp?(path) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
16
17
18
19
# File 'lib/downgrade/path.rb', line 11

def hit_regexp?(path)
  self.regexps.each do |regexp|
    if path =~ regexp
      return true
    end
  end

  false
end