Class: PairSee::LogLineParse
- Inherits:
-
Object
- Object
- PairSee::LogLineParse
- Defined in:
- lib/pair_see/log_line_parse.rb
Constant Summary collapse
- @@maximum_commits_to_parse =
9999
Instance Attribute Summary collapse
-
#log_lines ⇒ Object
readonly
Returns the value of attribute log_lines.
Instance Method Summary collapse
- #_parse(date_string, roots) ⇒ Object
-
#initialize(roots, date_string) ⇒ LogLineParse
constructor
A new instance of LogLineParse.
Constructor Details
#initialize(roots, date_string) ⇒ LogLineParse
Returns a new instance of LogLineParse.
9 10 11 |
# File 'lib/pair_see/log_line_parse.rb', line 9 def initialize(roots, date_string) @log_lines = _parse(date_string, roots) end |
Instance Attribute Details
#log_lines ⇒ Object (readonly)
Returns the value of attribute log_lines.
7 8 9 |
# File 'lib/pair_see/log_line_parse.rb', line 7 def log_lines @log_lines end |
Instance Method Details
#_parse(date_string, roots) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pair_see/log_line_parse.rb', line 13 def _parse(date_string, roots) lines = [] roots.each do |root| g = Git.open(root) lines << g.log(@@maximum_commits_to_parse).since(date_string).map do |l| LogLine.new("#{l.date} #{l.}") end end LogLines.new(lines.flatten) end |