Class: Wallaby::LazyRegexp

Inherits:
Regexp
  • Object
show all
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

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, **options)
  @lazy_source = source
  super(source.to_s, **options)
end