Class: GitHealthCheck::Packfile
- Inherits:
-
Object
- Object
- GitHealthCheck::Packfile
- Defined in:
- lib/git-health-check/packfile.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#garbage ⇒ Object
readonly
Returns the value of attribute garbage.
-
#in_pack ⇒ Object
readonly
Returns the value of attribute in_pack.
-
#pack_count ⇒ Object
readonly
Returns the value of attribute pack_count.
-
#prune_packable ⇒ Object
readonly
Returns the value of attribute prune_packable.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#size_of_pack ⇒ Object
readonly
Returns the value of attribute size_of_pack.
Instance Method Summary collapse
-
#initialize ⇒ Packfile
constructor
A new instance of Packfile.
- #packfile_stats ⇒ Object
Constructor Details
#initialize ⇒ Packfile
Returns a new instance of Packfile.
12 13 14 |
# File 'lib/git-health-check/packfile.rb', line 12 def initialize @git_lib = GitHealthCheck::GitLib.new end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
4 5 6 |
# File 'lib/git-health-check/packfile.rb', line 4 def count @count end |
#garbage ⇒ Object (readonly)
Returns the value of attribute garbage.
10 11 12 |
# File 'lib/git-health-check/packfile.rb', line 10 def garbage @garbage end |
#in_pack ⇒ Object (readonly)
Returns the value of attribute in_pack.
6 7 8 |
# File 'lib/git-health-check/packfile.rb', line 6 def in_pack @in_pack end |
#pack_count ⇒ Object (readonly)
Returns the value of attribute pack_count.
7 8 9 |
# File 'lib/git-health-check/packfile.rb', line 7 def pack_count @pack_count end |
#prune_packable ⇒ Object (readonly)
Returns the value of attribute prune_packable.
9 10 11 |
# File 'lib/git-health-check/packfile.rb', line 9 def prune_packable @prune_packable end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
5 6 7 |
# File 'lib/git-health-check/packfile.rb', line 5 def size @size end |
#size_of_pack ⇒ Object (readonly)
Returns the value of attribute size_of_pack.
8 9 10 |
# File 'lib/git-health-check/packfile.rb', line 8 def size_of_pack @size_of_pack end |
Instance Method Details
#packfile_stats ⇒ Object
16 17 18 19 20 21 |
# File 'lib/git-health-check/packfile.rb', line 16 def packfile_stats stats = @git_lib.count_objects @count, @size, @in_pack, @pack_count, @size_of_pack, @prune_packable, @garbage = stats.split("\n").map do |stat| stat.scan /\d+/ end end |