lib/webby/auto_builder.rb
# call-seq:
#    update( *events )
#
# The update method is called by the DirectoryWatcher when files have been
# modified, added, or deleted. An array of events is passed to his method,
# and each event contains the event type and the path to the file.
#
call-seq:
update( *events )

The update method is called by the DirectoryWatcher when files have been
modified, added, or deleted. An array of events is passed to his method,
and each event contains the event type and the path to the file.
call - seq : update ( * events ) The update method is called by the DirectoryWatcher when files have been modified added or deleted . An array of events is passed to his method and each event contains the event type and the path to the file .
def update( *events )
    ary = events.find_all {|evt| evt.type != :removed}
    return if ary.empty?
    ary.each do |evt|
      @log.debug "changed #{evt.path}"
      next unless test ?f, evt.path
      next if evt.path =~ ::Webby.exclude
      Resources.new evt.path
    end
    @builder.run :load_files => false
  rescue => err
    @log.error err
  end
def update ( * events ) ary = events . find_all { | evt | evt . type != :removed } return if ary . empty? ary . each do | evt | @log . debug "changed #{evt.path}" next unless test ?f , evt . path next if evt . path =~ :: Webby . exclude Resources . new evt . path end @builder . run :load_files => false rescue => err @log . error err end
call-seq:
update( *events )
call - seq : update ( * events )
events