Class: Git::Status::StatusFileFactory Private

Inherits:
Object
  • Object
show all
Defined in:
lib/git/status.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A factory class responsible for fetching git status data and building a hash of StatusFile objects.

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ StatusFileFactory

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of StatusFileFactory.



121
122
123
124
# File 'lib/git/status.rb', line 121

def initialize(base)
  @base = base
  @lib = base.lib
end

Instance Method Details

#construct_files

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Gathers all status data and builds a hash of file paths to StatusFile objects.



128
129
130
131
132
133
# File 'lib/git/status.rb', line 128

def construct_files
  files_data = fetch_all_files_data
  files_data.transform_values do |data|
    StatusFile.new(@base, data)
  end
end