lib/data_loader.rb
def depends(name)
    puts "depends(#{name})" if ENV['DEBUG']
    fileinfo = @data_loader_files[name.to_sym]
    raise RuntimeError, "Unsatisfied dependency '#{name}'"      unless fileinfo
    raise RuntimeError, "Circular Data Dependency in '#{name}'"  if fileinfo[:state] == :requested
    
    fileinfo[:state] = :requested unless fileinfo[:state] == :loaded
    @data_loader_files.load_file(name.to_sym)
  end
# This is useful for explictly stating a dependency
This is useful for explictly stating a dependency
This is useful for explictly stating a dependency
def depends(name)
    puts "depends(#{name})" if ENV['DEBUG']
    fileinfo = @data_loader_files[name.to_sym]
    raise RuntimeError, "Unsatisfied dependency '#{name}'"      unless fileinfo
    raise RuntimeError, "Circular Data Dependency in '#{name}'"  if fileinfo[:state] == :requested
    fileinfo[:state] = :requested unless fileinfo[:state] == :loaded
    @data_loader_files.load_file(name.to_sym)
  end
def depends ( name ) puts "depends(#{name})" if ENV [ 'DEBUG' ] fileinfo = @data_loader_files [ name . to_sym ] raise RuntimeError , "Unsatisfied dependency '#{name}'" unless fileinfo raise RuntimeError , "Circular Data Dependency in '#{name}'" if fileinfo [ :state ] == :requested fileinfo [ :state ] = :requested unless fileinfo [ :state ] == :loaded @data_loader_files . load_file ( name . to_sym ) end
This is useful for explictly stating a dependency
This is useful for explictly stating a dependency
name