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
35 36 37 38 39 40 |
# File 'lib/git/fsck_object.rb', line 35 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
22 23 24 |
# File 'lib/git/fsck_object.rb', line 22 def @message end |
#name ⇒ String? (readonly)
A name describing how the object is reachable (from --name-objects)
26 27 28 |
# File 'lib/git/fsck_object.rb', line 26 def name @name end |
#oid ⇒ String (readonly)
The object identifier (OID) of the object
18 19 20 |
# File 'lib/git/fsck_object.rb', line 18 def oid @oid end |
#type ⇒ Symbol (readonly)
The type of the Git object
14 15 16 |
# File 'lib/git/fsck_object.rb', line 14 def type @type end |
Instance Method Details
#to_s ⇒ String
Returns the OID as the string representation
44 45 46 |
# File 'lib/git/fsck_object.rb', line 44 def to_s oid end |