Class: Vpr::CLI

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

Instance Method Summary collapse

Constructor Details

#initialize(args = [], local_options = {}, config = {}) ⇒ CLI

Returns a new instance of CLI.



9
10
11
12
13
# File 'lib/vpr/cli.rb', line 9

def initialize(args = [], local_options = {}, config = {})
  super
  select_remote
  @url = Url.new
end

Instance Method Details

#branchObject



39
40
41
# File 'lib/vpr/cli.rb', line 39

def branch
  Launchy.open(url.branch_url)
end

#branchesObject



34
35
36
# File 'lib/vpr/cli.rb', line 34

def branches
  Launchy.open(url.branches_url)
end

#homeObject



19
20
21
# File 'lib/vpr/cli.rb', line 19

def home
  Launchy.open(url.home_url)
end

#issuesObject



29
30
31
# File 'lib/vpr/cli.rb', line 29

def issues
  Launchy.open(url.issues_url)
end

#pullObject



44
45
46
# File 'lib/vpr/cli.rb', line 44

def pull
  Launchy.open(url.pull_url)
end

#pullsObject



24
25
26
# File 'lib/vpr/cli.rb', line 24

def pulls
  Launchy.open(url.pulls_url)
end

#search(commit) ⇒ Object



54
55
56
# File 'lib/vpr/cli.rb', line 54

def search(commit)
  Launchy.open(url.search_url(commit))
end

#versionObject



59
60
61
# File 'lib/vpr/cli.rb', line 59

def version
  puts Vpr::VERSION
end

#visit(commit) ⇒ Object



49
50
51
# File 'lib/vpr/cli.rb', line 49

def visit(commit)
  Launchy.open(url.commit_url(commit))
end