lib/rack/unreloader/reloader.rb
def safe_load(file, options={})
        return unless @monitor_files.has_key?(file)
        return unless options[:force] || file_changed?(file)

        prepare(file) # might call #safe_load recursively
        log "Loading #{file}"
        begin
          require(file)
          commit(file)
        rescue Exception
          if !options[:cyclic]
            log "Failed to load #{file}; removing partially defined constants"
          end
          rollback(file)
          raise
        end
      end
# Requires the given file, logging which constants or features are added
# by the require, and rolling back the constants and features if there
# are any errors.
Requires the given file, logging which constants or features are added
by the require, and rolling back the constants and features if there
are any errors.
Requires the given file logging which constants or features are added by the require and rolling back the constants and features if there are any errors .
def safe_load(file, options={})
        return unless @monitor_files.has_key?(file)
        return unless options[:force] || file_changed?(file)
        prepare(file) 
        log "Loading #{file}"
        begin
          require(file)
          commit(file)
        rescue Exception
          if !options[:cyclic]
            log "Failed to load #{file}; removing partially defined constants"
          end
          rollback(file)
          raise
        end
      end
def safe_load ( file , options = { } ) return unless @monitor_files . has_key? ( file ) return unless options [ :force ] || file_changed? ( file ) prepare ( file ) log "Loading #{file}" begin require ( file ) commit ( file ) rescue Exception if ! options [ :cyclic ] log "Failed to load #{file}; removing partially defined constants" end rollback ( file ) raise end end
Requires the given file, logging which constants or features are added
by the require, and rolling back the constants and features if there
are any errors.
Requires the given file logging which constants or features are added by the require and rolling back the constants and features if there are any errors .
# might call #safe_load recursively
file
options