Class: Wallaby::LookupContextWrapper
- Inherits:
-
Object
- Object
- Wallaby::LookupContextWrapper
- Defined in:
- lib/services/wallaby/lookup_context_wrapper.rb
Overview
Lookup context wrapper. This is to take care of missing template in production to return string template.
Defined Under Namespace
Classes: BlankTemplate
Instance Method Summary collapse
- #find_template(*args) ⇒ Object
-
#initialize(lookup_context) ⇒ LookupContextWrapper
constructor
A new instance of LookupContextWrapper.
Constructor Details
#initialize(lookup_context) ⇒ LookupContextWrapper
Returns a new instance of LookupContextWrapper.
11 12 13 |
# File 'lib/services/wallaby/lookup_context_wrapper.rb', line 11 def initialize(lookup_context) @lookup_context = lookup_context end |
Instance Method Details
#find_template(*args) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/services/wallaby/lookup_context_wrapper.rb', line 15 def find_template(*args) @lookup_context.find_template(*args) rescue ::ActionView::MissingTemplate raise if Rails.env.development? BlankTemplate.new end |