Class: Cran::Cli::CranIndexer

Inherits:
Thor
  • Object
show all
Defined in:
lib/cran/cli/cran_indexer.rb

Instance Method Summary collapse

Instance Method Details

#infoObject



55
56
57
# File 'lib/cran/cli/cran_indexer.rb', line 55

def info
  ap(Cran::Db.pull(options[:url]))
end

#listObject



35
36
37
38
39
# File 'lib/cran/cli/cran_indexer.rb', line 35

def list
  files = Cran::Db.list
  ap(sprintf("Toal Indexed files: %d", files.size))
  ap(files)
end

#resetObject



42
43
44
45
46
47
# File 'lib/cran/cli/cran_indexer.rb', line 42

def reset
  Cran::Db.delete_all
  files = Cran::Db.list
  ap(sprintf("Toal Indexed files: %d", files.size))
  ap(files)
end

#startObject



29
30
31
32
# File 'lib/cran/cli/cran_indexer.rb', line 29

def start
  repository = Cran::Repository.new(options)
  repository.update
end