Class: Git::DirstatEntry Private

Inherits:
Data
  • Object
show all
Defined in:
lib/git/dirstat_info.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.

Immutable value object representing a single directory's contribution to a diff

Work in progress; this class is internal for now and may be made public in a future release.

Examples:

Create a DirstatEntry

info = Git::DirstatEntry.new(directory: 'lib/commands/', percentage: 45.2)
info.directory   #=> "lib/commands/"
info.percentage  #=> 45.2

Instance Attribute Summary collapse

Instance Attribute Details

#directoryString (readonly)

Returns the directory path (always ends with '/').

Returns:

  • (String)

    the directory path (always ends with '/')



21
# File 'lib/git/dirstat_info.rb', line 21

DirstatEntry = Data.define(:directory, :percentage)

#percentageFloat (readonly)

Returns the percentage of changes in this directory (0.0-100.0).

Returns:

  • (Float)

    the percentage of changes in this directory (0.0-100.0)



21
# File 'lib/git/dirstat_info.rb', line 21

DirstatEntry = Data.define(:directory, :percentage)