Class: GhBackup::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gh_backup.rb

Overview

Backup CLI

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CLI

Returns a new instance of CLI.



108
109
110
111
# File 'lib/gh_backup.rb', line 108

def initialize(*args)
  @backup = Base.new
  super
end

Instance Method Details

#all(org, user, pass) ⇒ Object



132
133
134
# File 'lib/gh_backup.rb', line 132

def all(org, user, pass)
  @backup.clone_org_repos(org, user, pass)
end

#clone(account, user, pass, repo) ⇒ Object



122
123
124
# File 'lib/gh_backup.rb', line 122

def clone(, user, pass, repo)
  @backup.clone_repo(user, pass, , repo)
end

#list(account, user, pass) ⇒ Object



137
138
139
# File 'lib/gh_backup.rb', line 137

def list(, user, pass)
  puts @backup.list_org_repos(, user, pass)
end

#userObject



116
117
118
119
# File 'lib/gh_backup.rb', line 116

def user
  puts options.inspect
  puts options.username
end

#yml(account, user, pass) ⇒ Object



127
128
129
# File 'lib/gh_backup.rb', line 127

def yml(, user, pass)
  @backup.backup(, user, pass)
end