Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.56 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   def update_monitoring_state_for_paths(checked_paths, unchecked_paths) #ckdake
  2.     change_found = false
  3.     flatten_paths do |child, flattened_path|
  4.  
  5.       if checked_paths.include?(flattened_path) && child.unmonitored?
  6.         puts "im not monitored and i should be!"
  7.         child.start_monitoring
  8.         change_found = true
  9.       end
  10.      
  11.       if unchecked_paths.include?(flattened_path) && child.monitored?
  12.         puts "im monitored and i should not be!"
  13.         child.stop_monitoring
  14.         change_found = true
  15.       end
  16.      
  17.     end
  18.     change_found
  19.   end