class FakeGit::ListObjects

Public Instance Methods

call(*args) click to toggle source
# File lib/fake_git/list_objects.rb, line 4
def call(*args)
  collection = []
  file_names.each do |file|
    pruned = file.gsub(".fakegit/objects/", "")
    index = pruned.split("/").join
    collection << FakeGit::FetchObject.new.call(index)
  end

  collection
end

Private Instance Methods

file_names() click to toggle source
# File lib/fake_git/list_objects.rb, line 16
def file_names
  `find .fakegit/objects -type f`.split("\n")
end