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
24 25 26 |
# File 'lib/git/log.rb', line 24 def commits @commits end |
Instance Method Details
#[](index)
29 |
# File 'lib/git/log.rb', line 29 def [](index) = commits[index] |
#each(&block)
27 |
# File 'lib/git/log.rb', line 27 def each(&block) = commits.each(&block) |
#last
28 |
# File 'lib/git/log.rb', line 28 def last = commits.last |
#size
31 |
# File 'lib/git/log.rb', line 31 def size = commits.size |
#to_s
30 |
# File 'lib/git/log.rb', line 30 def to_s = map(&:to_s).join("\n") |