Class: SimpleGit::DiffStat
- Inherits:
-
Object
- Object
- SimpleGit::DiffStat
- Defined in:
- lib/simple_git/diff_stat.rb
Defined Under Namespace
Classes: DiffStatWrapper
Instance Attribute Summary collapse
-
#ptr ⇒ Object
Returns the value of attribute ptr.
Instance Method Summary collapse
- #deletions ⇒ Object
-
#initialize(diff) ⇒ DiffStat
constructor
A new instance of DiffStat.
- #insertions ⇒ Object
Constructor Details
#initialize(diff) ⇒ DiffStat
Returns a new instance of DiffStat.
5 6 7 8 9 10 11 |
# File 'lib/simple_git/diff_stat.rb', line 5 def initialize(diff) wrapper = DiffStatWrapper.new Git2.git_diff_get_stats(wrapper, diff.ptr) @ptr = wrapper[:stat] ObjectSpace.define_finalizer(self, self.class.finalize(@ptr)) end |
Instance Attribute Details
#ptr ⇒ Object
Returns the value of attribute ptr.
3 4 5 |
# File 'lib/simple_git/diff_stat.rb', line 3 def ptr @ptr end |