Class: LazyRepo

Inherits:
Repo
  • Object
show all
Defined in:
lib/lazy_repo.rb

Instance Attribute Summary

Attributes inherited from Repo

#shell

Instance Method Summary collapse

Methods inherited from Repo

#changed?, #current_branch, #find_files, #grep, root_dir, #status_files

Constructor Details

#initialize(*args) ⇒ LazyRepo

Returns a new instance of LazyRepo.



5
6
7
8
# File 'lib/lazy_repo.rb', line 5

def initialize(*args)
  super
  set_all_files
end

Instance Method Details

#files_changedObject



10
11
12
# File 'lib/lazy_repo.rb', line 10

def files_changed
  @all_files
end

#set_all_filesObject



14
15
16
17
# File 'lib/lazy_repo.rb', line 14

def set_all_files
  shell.notify "\nIdentifying all files:"
  @all_files = shell.run("git ls-tree --full-tree -r HEAD --name-only").split("\n")
end