Class: FileManager
Instance Attribute Summary collapse
-
#vfs ⇒ Object
readonly
Returns the value of attribute vfs.
Instance Method Summary collapse
- #apply!(commits, meta) ⇒ Object
-
#initialize(branch) ⇒ FileManager
constructor
A new instance of FileManager.
Methods included from FileHelper
#compare, #fdiff_stat, #print_context
Constructor Details
#initialize(branch) ⇒ FileManager
Returns a new instance of FileManager.
13 14 15 16 |
# File 'lib/file_manager.rb', line 13 def initialize(branch) @branch = branch @vfs = VirtualFileSystem.new() end |
Instance Attribute Details
#vfs ⇒ Object (readonly)
Returns the value of attribute vfs.
11 12 13 |
# File 'lib/file_manager.rb', line 11 def vfs @vfs end |
Instance Method Details
#apply!(commits, meta) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/file_manager.rb', line 18 def apply!(commits, ) vfs.load!(commits, ) .each do |commit| # TODO: Won't work for first commit... coverage = [:coverage].get_report(commit.id, @vfs.file_paths) errors = [:errors]&.get_errors!(commit) || [] apply_commit!(commit, errors, coverage) Cache.index_commit(@branch, commit.id) end end |