module HeavyControl::ExplicitLoader
Public Class Methods
apply()
click to toggle source
# File lib/heavy_control/explicit_loader.rb, line 6 def apply load_consts # explicit loading for production reloader_class.to_prepare do # handle reloading in dev mode HeavyControl::ExplicitLoader.load_consts end end
load_consts()
click to toggle source
# File lib/heavy_control/explicit_loader.rb, line 14 def load_consts HeavyControl.config[:always_load].each(&:constantize) end
Private Class Methods
reloader_class()
click to toggle source
# File lib/heavy_control/explicit_loader.rb, line 20 def reloader_class case Rails::VERSION::MAJOR when 5 then ActiveSupport::Reloader when 4 then ActionDispatch::Reloader end end