Class: RailsDevTweaks::GranularAutoload::Matchers::PathMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_dev_tweaks/granular_autoload/matchers/path_matcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(regex) ⇒ PathMatcher

Returns a new instance of PathMatcher.



3
4
5
# File 'lib/rails_dev_tweaks/granular_autoload/matchers/path_matcher.rb', line 3

def initialize(regex)
  @regex = regex
end

Instance Method Details

#call(request) ⇒ Object



7
8
9
# File 'lib/rails_dev_tweaks/granular_autoload/matchers/path_matcher.rb', line 7

def call(request)
  @regex =~ request.fullpath
end