Class: Vizier::CachingPresenterConfig

Inherits:
PresenterConfig show all
Defined in:
lib/vizier/caching_presenter_config.rb

Overview

A presenter configuration that caches the type lookup

For development use reloading is convenient, but in production the constants should not be redefined. We cache them here to avoid repeated global lookups.

Instance Method Summary collapse

Methods inherited from PresenterConfig

#initialize, #present

Constructor Details

This class inherits a constructor from Vizier::PresenterConfig

Instance Method Details

#policyObject



18
19
20
# File 'lib/vizier/caching_presenter_config.rb', line 18

def policy
  @policy ||= super
end

#presenterObject



14
15
16
# File 'lib/vizier/caching_presenter_config.rb', line 14

def presenter
  @presenter ||= super
end

#typeObject



10
11
12
# File 'lib/vizier/caching_presenter_config.rb', line 10

def type
  @type ||= super
end