class Raykit::Console
def remove
def remove if(@opts.arguments.length < 2) puts 'remove requires a url or pattern' return 1 end pattern='' pattern=@opts.arguments[1] if(@opts.arguments.length > 1) remove_urls = REPOSITORIES.matches(pattern) if(remove_urls.length == 0) puts 'no matching urls found.' else remove_urls.each{|url| REPOSITORIES.delete(url) puts 'url ' + url + ' removed.' } REPOSITORIES.save(REPOSITORIES.filename) end end