class Middleman::CoreExtensions::FileWatcher::API

def run_callbacks(path, callbacks_name)

Returns:
  • (void) -

Parameters:
  • callbacks_name (Symbol) -- The name of the callbacks method
  • path (String) -- The file that was changed
def run_callbacks(path, callbacks_name)
  self.send(callbacks_name).each do |callback, matcher|
    next if path.match(%r{^#{@app.build_dir}/})
    next unless matcher.nil? || path.match(matcher)
    @app.instance_exec(path, &callback)
  end
end