class Runner

Public Instance Methods

doctor() click to toggle source
# File lib/runner.rb, line 9
def doctor
    ScanDex::doctor()
end
index(*files) click to toggle source
# File lib/runner.rb, line 23
def index(*files)
    # If doctor fails then there is no point in even trying
    if !ScanDex::doctor()
        return
    end
    files.each do |file|
        ScanDex::index_and_store(options[:f], file, options[:force])
   end
end
list() click to toggle source
# File lib/runner.rb, line 14
def list
    files = ScanDex::documents(options[:f])
    files.each do |file|
        puts "#{file[0]} #{file[1]}"
    end
end
watch(*directories) click to toggle source
# File lib/runner.rb, line 42
def watch(*directories)
    FileWatcher.new(directories).watch do |file, event|
        if (event == :changed || event == :new)
            ScanDex::index_and_store(options[:f], file, true)
        end
    end
end