Class: Lingohub::Command::Project
- Inherits:
-
Base
- Object
- Base
- Lingohub::Command::Project
show all
- Defined in:
- lib/lingohub/commands/project.rb
Instance Attribute Summary
Attributes inherited from Base
#args, #autodetected_app
Instance Method Summary
collapse
Methods inherited from Base
#app_urls, #escape, #extract_app_from_git_config, #extract_option, #extract_project_title_from_args, #extract_project_title_from_dir_name, #extract_project_title_from_git, #git_remotes, #git_url, #initialize, #lingohub, #project, #project_title
Methods included from Helpers
#ask, #confirm, #confirm_command, #deprecate, #display, #error, #format_date, #git, #has_git?, #home_directory, #redisplay, #retry_on_exception, #run_command, #running_on_a_mac?, #running_on_windows?, #shell
Instance Method Details
#list ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/lingohub/commands/project.rb', line 15
def list
list = lingohub.projects.all
if list.size > 0
display "Projects:\n"
list.each_pair { |name, project|
display "- #{name}"
}
else
display "You have no projects."
end
end
|
#logout ⇒ Object
10
11
12
13
|
# File 'lib/lingohub/commands/project.rb', line 10
def logout
Lingohub::Command.run_internal "auth:delete_credentials", args.dup
display "Local credentials cleared."
end
|
#open ⇒ Object
27
28
29
|
# File 'lib/lingohub/commands/project.rb', line 27
def open
Launchy.open project.weburl
end
|