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.



113
114
115
116
# File 'lib/git/status.rb', line 113

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.



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

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