Class: Git::FsckObject
- Inherits:
-
Object
- Object
- Git::FsckObject
- Defined in:
- lib/git/fsck_object.rb
Overview
Represents an object returned by git fsck
This class provides information about dangling, missing, unreachable, or problematic Git objects found during repository integrity checks.
Instance Attribute Summary collapse
-
#message ⇒ String?
readonly
A warning or error message associated with this object.
-
#name ⇒ String?
readonly
A name describing how the object is reachable (from --name-objects).
-
#oid ⇒ String
readonly
The object identifier (OID) of the object.
-
#type ⇒ Symbol
readonly
The type of the Git object.
Instance Method Summary collapse
-
#initialize(type:, oid:, message: nil, name: nil) ⇒ FsckObject
constructor
Create a new FsckObject.
-
#to_s ⇒ String
Returns the OID as the string representation.
Constructor Details
#initialize(type:, oid:, message: nil, name: nil) ⇒ FsckObject
Create a new FsckObject
42 43 44 45 46 47 |
# File 'lib/git/fsck_object.rb', line 42 def initialize(type:, oid:, message: nil, name: nil) @type = type @oid = oid @message = @name = name end |
Instance Attribute Details
#message ⇒ String? (readonly)
A warning or error message associated with this object
25 26 27 |
# File 'lib/git/fsck_object.rb', line 25 def @message end |
#name ⇒ String? (readonly)
A name describing how the object is reachable (from --name-objects)
30 31 32 |
# File 'lib/git/fsck_object.rb', line 30 def name @name end |
#oid ⇒ String (readonly)
The object identifier (OID) of the object
20 21 22 |
# File 'lib/git/fsck_object.rb', line 20 def oid @oid end |
#type ⇒ Symbol (readonly)
The type of the Git object
15 16 17 |
# File 'lib/git/fsck_object.rb', line 15 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns the OID as the string representation
52 53 54 |
# File 'lib/git/fsck_object.rb', line 52 def to_s oid end |