class PostyClient::CLI

Public Instance Methods

create_config() click to toggle source
# File lib/posty_client/cli.rb, line 22
def create_config
  require 'fileutils'

  user_config_file = File.expand_path('~/.posty_client.yml')
  if File.exists?(user_config_file)
    say("File #{user_config_file} already exists! Nothing created.", :red)
    exit 1
  end

  FileUtils.cp(PostyClient.root + '/config/posty_client.yml.dist', user_config_file)
  say("File #{user_config_file} created. Please customize.", :green)
end
summary() click to toggle source
# File lib/posty_client/cli.rb, line 36
def summary
  print_table(PostyClient::Resources::Summary.get)
end
version() click to toggle source
# File lib/posty_client/cli.rb, line 17
def version
  puts "version %s" % [PostyClient::VERSION]
end