Class: Git::Log::Result
- Inherits:
-
Data
- Object
- Data
- Git::Log::Result
- Includes:
- Enumerable
- Defined in:
- lib/git/log.rb
Overview
An immutable, Enumerable collection of Git::Object::Commit objects.
Returned by Git::Log#execute.
Instance Attribute Summary collapse
-
#commits ⇒ Object
readonly
Returns the value of attribute commits.
Instance Method Summary collapse
Instance Attribute Details
#commits ⇒ Object (readonly)
Returns the value of attribute commits
31 32 33 |
# File 'lib/git/log.rb', line 31 def commits @commits end |
Instance Method Details
#[](index)
36 |
# File 'lib/git/log.rb', line 36 def [](index) = commits[index] |
#each(&block)
34 |
# File 'lib/git/log.rb', line 34 def each(&block) = commits.each(&block) |
#last
35 |
# File 'lib/git/log.rb', line 35 def last = commits.last |
#size
38 |
# File 'lib/git/log.rb', line 38 def size = commits.size |
#to_s
37 |
# File 'lib/git/log.rb', line 37 def to_s = commits.join("\n") |