Method: Jets::Booter.preload_extensions

Defined in:
lib/jets/booter.rb

.preload_extensionsObject



62
63
64
65
66
67
68
69
70
71
# File 'lib/jets/booter.rb', line 62

def preload_extensions
  base_path = "#{Jets.root}/app/extensions"
  Dir.glob("#{base_path}/**/*.rb").each do |path|
    next unless File.file?(path)

    class_name = path.sub("#{base_path}/", '').sub(/\.rb/,'').camelize
    klass = class_name.constantize # autoload
    Jets::Lambda::Functions.extend(klass)
  end
end