Method: Schemacop::V3::GlobalContext#eager_load!

Defined in:
lib/schemacop/v3/global_context.rb

#eager_load!Object



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/schemacop/v3/global_context.rb', line 32

def eager_load!
  @schemas = {}

  fail "Global context can't be eager loaded more than once." if @eager_loaded

  Schemacop.load_paths.each do |load_path|
    Dir.glob(File.join(load_path, '**', '*.rb')).sort.each do |file|
      load_file(file, load_path)
    end
  end

  @eager_loaded = true
end