class Importmap::Reloader
Public Instance Methods
reload!()
click to toggle source
# File lib/importmap/reloader.rb, line 4 def reload! import_map_paths.each { |path| Rails.application.importmap.draw(path) } end
Private Instance Methods
config()
click to toggle source
# File lib/importmap/reloader.rb, line 17 def config Rails.application.config end
import_map_paths()
click to toggle source
# File lib/importmap/reloader.rb, line 13 def import_map_paths config.importmap.paths end
updater()
click to toggle source
# File lib/importmap/reloader.rb, line 9 def updater @updater ||= config.file_watcher.new(import_map_paths) { reload! } end