ActiveSupport::FileUpdateChecker

class ActiveSupport::FileUpdateChecker

Parent:
Object

FileUpdateChecker specifies the API used by Rails to watch files and control reloading. The API depends on four methods:

  • initialize which expects two parameters and one block as described below.

  • updated? which returns a boolean if there were updates in the filesystem or not.

  • execute which executes the given block on initialization and updates the latest watched files and timestamp.

  • execute_if_updated which just executes the block if it was updated.

After initialization, a call to execute_if_updated must execu