Method: WebArchive::Completer#reload!

Defined in:
lib/webarchive.rb

#reload!void

This method returns an undefined value.



292
293
294
295
296
297
298
299
300
301
# File 'lib/webarchive.rb', line 292

def reload!
  if File.exist? @file
    File.open(@file, encoding: 'utf-8').each_line do |x|
      @trie.add x.strip
    end
  else
    File.new(@file, 'w', encoding: 'utf-8').flush
  end
  @lastupdate = Time.now
end