class Access

Constants

COL_WIDTH

Public Class Methods

find(name) click to toggle source
# File lib/mygit.rb, line 71
def find name
  found = nil
  repo.each do |r|
    found = r if r['name'] == name
  end
  found
end
list() click to toggle source
# File lib/mygit.rb, line 64
def list
  repo.each do |r|
    spaces = ' ' * (COL_WIDTH - r['name'].size) unless r['name'].size > COL_WIDTH
    puts "#{r['name']} #{spaces} #{r['ssh_url']}"
  end
end
repo() click to toggle source
# File lib/mygit.rb, line 79
def repo
  @repo ||= FileStorage.new.repo
end