Class: Loca::CLI
Instance Method Summary collapse
Instance Method Details
#__print_version ⇒ Object
8 9 10 |
# File 'lib/loca/cli.rb', line 8 def __print_version puts Loca::VERSION end |
#c(pasted_url) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/loca/cli.rb', line 14 def c(pasted_url) return d(pasted_url) if [:delete] git = Loca::Git.new(pasted_url) branch_name = git.branch_name if git.first_time_creating? || yes?("WARN: Branch '#{branch_name}' "\ ' already exists. Overwrite? (n)', :yellow) git.fetch git.checkout say "Checked out #{branch_name}!", :green else fail Loca::Error::GitAborted, 'Git checkout aborted!' end end |