Class: Wallaby::LazyRegexp
- Inherits:
-
Regexp
- Object
- Regexp
- Wallaby::LazyRegexp
- Defined in:
- lib/routes/wallaby/lazy_regexp.rb
Overview
This is designed to delegate all the methods to #lazy_regexp
So that it doesn't need to load all the models for Map.mode_map
when the engine is mounted in config/routes.rb
Instance Method Summary collapse
-
#initialize(source, **options) ⇒ LazyRegexp
constructor
A new instance of LazyRegexp.
Constructor Details
#initialize(source, **options) ⇒ LazyRegexp
Returns a new instance of LazyRegexp.
13 14 15 16 |
# File 'lib/routes/wallaby/lazy_regexp.rb', line 13 def initialize(source, **) @lazy_source = source super(source.to_s, **) end |