class Findrr::Command
Public Instance Methods
collect(path)
click to toggle source
# File lib/findrr/command.rb, line 14 def collect(path) Config.new.save(path) begin Database.new.collect(path) rescue => e $stderr.puts <<-END_OF_MESSAGE #{e.class}: #{e.message} Hint: table schema might be changed. Please try `findrr destroy` command. END_OF_MESSAGE end end
destroy()
click to toggle source
# File lib/findrr/command.rb, line 39 def destroy Database.new.destroy end
search(part_of_filename)
click to toggle source
# File lib/findrr/command.rb, line 27 def search(part_of_filename) begin Database.new.search(part_of_filename) rescue => e $stderr.puts <<-END_OF_MESSAGE #{e.class}: #{e.message} Hint: database probably isn't created. Please try `findrr collect` command. END_OF_MESSAGE end end
version()
click to toggle source
# File lib/findrr/command.rb, line 9 def version puts VERSION end