Class: RailsDevTweaks::GranularAutoload::Matchers::PathMatcher
- Inherits:
-
Object
- Object
- RailsDevTweaks::GranularAutoload::Matchers::PathMatcher
- Defined in:
- lib/rails_dev_tweaks/granular_autoload/matchers/path_matcher.rb
Instance Method Summary collapse
- #call(request) ⇒ Object
-
#initialize(regex) ⇒ PathMatcher
constructor
A new instance of PathMatcher.
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 |