Class: Kurgan::List

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/kurgan/list.rb

Instance Method Summary collapse

Instance Method Details

#displayObject



17
18
19
20
21
22
# File 'lib/kurgan/list.rb', line 17

def display
  puts Terminal::Table.new( 
    :headings => ['Component', 'Git URL', 'Last Updated'], 
    :rows => @hl_repos.sort
  )
end

#get_reposObject



9
10
11
12
13
14
15
# File 'lib/kurgan/list.rb', line 9

def get_repos
  repos = Kurgan::GitHub.get_repos()
  if repos.nil?
    abort "Error: Somthing went wrong with connecting to the github api"
  end
  @hl_repos = repos.map {|repo| [repo[:name], repo[:url], repo[:updated_at]]}
end