Class: Certs::Apple

Inherits:
Object
  • Object
show all
Defined in:
lib/cert-help/apple.rb

Class Method Summary collapse

Class Method Details

.apple(command) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/cert-help/apple.rb', line 12

def apple(command)

  certs = []

  searches = []

  searches << "iPhone Distribution" if command == 'dist' || command == 'all'
  searches << "iPhone Developer"    if command == 'dev' || command == 'all'

  searches.each do |term|
    Certs::Search.searchAux(certs, term)
  end

  if certs.size > 0
    puts certs
  else
    puts "Couldn't find any certs"
  end

end

.execute(command) ⇒ Object



5
6
7
8
9
10
# File 'lib/cert-help/apple.rb', line 5

def execute(command)

  return apple(command) if ['dev', 'dist', 'all'].includes?(command)
  return help

end

.helpObject



33
34
35
36
37
38
# File 'lib/cert-help/apple.rb', line 33

def help
  puts "#{Certs::COMMAND} apple <command>"
  puts "<command> is optional"
  puts "\tdist    search for distribution certificates"
  puts "\tdev     search for development certificates"
end