Class: BzrWrapper::Log
- Inherits:
-
Object
- Object
- BzrWrapper::Log
- Defined in:
- lib/bzrwrapper.rb
Overview
represents the branch-log with <n> ‘Commit’s
Constant Summary collapse
- SEPARATOR =
'------------------------------------------------------------'
Instance Attribute Summary collapse
-
#commits ⇒ Object
readonly
array of BzrWrapper::Commit’s of this BzrWrapper::Log.
-
#count ⇒ Object
readonly
num of log-entries.
Instance Method Summary collapse
-
#each_entry ⇒ Object
Iterates over supplied Commits.
-
#initialize(le_array, &block) ⇒ Log
constructor
A new instance of Log.
Constructor Details
#initialize(le_array, &block) ⇒ Log
Returns a new instance of Log.
207 208 209 210 211 |
# File 'lib/bzrwrapper.rb', line 207 def initialize(le_array, &block) @count = le_array.length @commits = le_array block_given? ? @commits.each { |x| yield x } : self end |
Instance Attribute Details
#commits ⇒ Object (readonly)
array of BzrWrapper::Commit’s of this BzrWrapper::Log
205 206 207 |
# File 'lib/bzrwrapper.rb', line 205 def commits @commits end |
#count ⇒ Object (readonly)
num of log-entries
203 204 205 |
# File 'lib/bzrwrapper.rb', line 203 def count @count end |
Instance Method Details
#each_entry ⇒ Object
Iterates over supplied Commits.
214 215 216 |
# File 'lib/bzrwrapper.rb', line 214 def each_entry block_given? ? @commits.each { |c| yield c } : @commits end |