Class: Awesomekit::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/awesomekit/cli.rb

Instance Method Summary collapse

Instance Method Details

#listObject



19
20
21
22
23
24
25
26
27
28
29
30
# 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

#logoutObject



9
10
11
12
# File 'lib/awesomekit/cli.rb', line 9

def logout
  Awesomekit::Authenticator.clear_api_token
  ap('Successfully logged out', color: { string: :yellow })
end

#showObject



37
38
39
40
41
# File 'lib/awesomekit/cli.rb', line 37

def show
  kit = typekit_client.get_kit(options[:id], options[:published])

  ap(kit) if kit
end

#yoObject



44
45
46
47
48
# 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