lib/rb-urlvoid/cli.rb
# Default path to the config file
#
# @return [String] Default path to the config file
Default path to the config file
Default path to the config file
def create_config(file = CONFIG_FILE)
      path = File.expand_path(file)
      if File.exist?(path)
        puts "[!] #{path} is already exists. Please delete it if you want to re-create it."
      else
        h = { api_key: "INSERT YOUR API KEY", identifier: "api1000" }
        YAML.dump h, File.open(path, "w+")
        puts "[*] An empty #{path} has been created. Please edit and fill the correct values."
      end
    end
def create_config ( file = CONFIG_FILE ) path = File . expand_path ( file ) if File . exist? ( path ) puts "[!] #{path} is already exists. Please delete it if you want to re-create it." else h = { api_key : "INSERT YOUR API KEY" , identifier : "api1000" } YAML . dump h , File . open ( path , "w+" ) puts "[*] An empty #{path} has been created. Please edit and fill the correct values." end end
Default path to the config file
Default path to the config file
Default path to the config file
Default path to the config file
String
file