class Fontist::RepoCLI
Public Instance Methods
info(name)
click to toggle source
# File lib/fontist/repo_cli.rb, line 51 def info(name) handle_class_options(options) info = Repo.info(name) Fontist.ui.say(info.to_s) CLI::STATUS_SUCCESS rescue Errors::RepoNotFoundError handle_repo_not_found(name) end
list()
click to toggle source
# File lib/fontist/repo_cli.rb, line 42 def list handle_class_options(options) Repo.list.each do |name| Fontist.ui.say(name) end CLI::STATUS_SUCCESS end
remove(name)
click to toggle source
# File lib/fontist/repo_cli.rb, line 30 def remove(name) handle_class_options(options) Repo.remove(name) Fontist.ui.success( "Fontist repo '#{name}' has been successfully removed.", ) CLI::STATUS_SUCCESS rescue Errors::RepoNotFoundError handle_repo_not_found(name) end
setup(name, url)
click to toggle source
# File lib/fontist/repo_cli.rb, line 8 def setup(name, url) handle_class_options(options) Repo.setup(name, url) Fontist.ui.success( "Fontist repo '#{name}' from '#{url}' has been successfully set up.", ) CLI::STATUS_SUCCESS end
update(name)
click to toggle source
# File lib/fontist/repo_cli.rb, line 18 def update(name) handle_class_options(options) Repo.update(name) Fontist.ui.success( "Fontist repo '#{name}' has been successfully updated.", ) CLI::STATUS_SUCCESS rescue Errors::RepoNotFoundError handle_repo_not_found(name) end