Class: Fontist::RepoCLI
  
  
  
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #handle_class_options, included, #log_level
  
  
    Instance Method Details
    
      
    
      
  
  
    #list  ⇒ Object 
  
  
  
  
    
      
42
43
44
45
46
47
48 
     | 
    
      # File 'lib/fontist/repo_cli.rb', line 42
def list
  handle_class_options(options)
  Repo.list.each do |name|
    Fontist.ui.say(name)
  end
  CLI::STATUS_SUCCESS
end
     | 
  
 
    
      
  
  
    #remove(name)  ⇒ Object 
  
  
  
  
    
      
30
31
32
33
34
35
36
37
38
39 
     | 
    
      # File 'lib/fontist/repo_cli.rb', line 30
def remove(name)
  handle_class_options(options)
  Repo.remove(name)
  Fontist.ui.success(
    "Fontist repo '#{name}' has been successfully removed.",
  )
  CLI::STATUS_SUCCESS
rescue Errors::RepoNotFoundError
  handle_repo_not_found(name)
end
     | 
  
 
    
      
  
  
    #setup(name, url)  ⇒ Object 
  
  
  
  
    
      
8
9
10
11
12
13
14
15 
     | 
    
      # File 'lib/fontist/repo_cli.rb', line 8
def setup(name, url)
  handle_class_options(options)
  Repo.setup(name, url)
  Fontist.ui.success(
    "Fontist repo '#{name}' from '#{url}' has been successfully set up.",
  )
  CLI::STATUS_SUCCESS
end
     | 
  
 
    
      
  
  
    #update(name)  ⇒ Object 
  
  
  
  
    
      
18
19
20
21
22
23
24
25
26
27 
     | 
    
      # File 'lib/fontist/repo_cli.rb', line 18
def update(name)
  handle_class_options(options)
  Repo.update(name)
  Fontist.ui.success(
    "Fontist repo '#{name}' has been successfully updated.",
  )
  CLI::STATUS_SUCCESS
rescue Errors::RepoNotFoundError
  handle_repo_not_found(name)
end
     |