activesupport/lib/active_support/file_update_checker.rb
def compile_glob(hash)
      hash.freeze # Freeze so changes aren't accidentally pushed
      return if hash.empty?

      globs = hash.map do |key, value|
        "#{escape(key)}/**/*#{compile_ext(value)}"
      end
      "{#{globs.join(",")}}"
    end
# It accepts two parameters on initialization. The first is an array
# of files and the second is an optional hash of directories. The hash must
# have directories as keys and the value is an array of extensions to be
# watched under that directory.
#
# This method must also receive a block that will be called once a path
# changes. The array of files and list of directories cannot be changed
# after FileUpdateChecker has been initialized.
It accepts two parameters on initialization. The first is an array
of files and the second is an optional hash of directories. The hash must
have directories as keys and the value is an array of extensions to be
watched under that directory.

This method must also receive a block that will be called once a path
changes. The array of files and list of directories cannot be changed
after FileUpdateChecker has been initialized.
It accepts two parameters on initialization . The first is an array of files and the second is an optional hash of directories . The hash must have directories as keys and the value is an array of extensions to be watched under that directory . This method must also receive a block that will be called once a path changes . The array of files and list of directories cannot be changed after FileUpdateChecker has been initialized .
def compile_glob(hash)
      hash.freeze 
      return if hash.empty?
      globs = hash.map do |key, value|
        "#{escape(key)}/**/*#{compile_ext(value)}"
      end
      "{#{globs.join(",")}}"
    end
def compile_glob ( hash ) hash . freeze return if hash . empty? globs = hash . map do | key , value | "#{escape(key)}/**/*#{compile_ext(value)}" end "{#{globs.join(",")}}" end
It accepts two parameters on initialization.
It accepts two parameters on initialization .
# Freeze so changes aren't accidentally pushed
hash