class Awesomekit::CLI
Public Instance Methods
list()
click to toggle source
# File lib/awesomekit/cli.rb, line 19 def list kits = typekit_client.get_kits ap(kits) if kits if options[:verbose] kits.each do |kit| kit = typekit_client.get_kit(kit['id'], options[:published]) ap(kit) if kit end end end
logout()
click to toggle source
# File lib/awesomekit/cli.rb, line 9 def logout Awesomekit::Authenticator.clear_api_token ap('Successfully logged out', color: { string: :yellow }) end
show()
click to toggle source
# File lib/awesomekit/cli.rb, line 37 def show kit = typekit_client.get_kit(options[:id], options[:published]) ap(kit) if kit end
yo()
click to toggle source
# File lib/awesomekit/cli.rb, line 44 def yo puts("What is your name? \n") name = STDIN.gets.chomp puts(" ~(0.0)~ \nyo #{name}, you seem pretty cool.\nYou should totally fork this repo and make it more awesome.\n") end
Private Instance Methods
typekit_client()
click to toggle source
# File lib/awesomekit/cli.rb, line 52 def typekit_client @client ||= Awesomekit::Client.new(Awesomekit::Authenticator.api_token) end