Class: Wlog::FetchGitCommitsStandard

Inherits:
Commandable show all
Defined in:
lib/wlog/commands/fetch_git_commits_standard.rb

Overview

Author:

  • Simon Symeonidis

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to) ⇒ FetchGitCommitsStandard

Returns a new instance of FetchGitCommitsStandard.

Parameters:

  • from

    date start

  • to

    date end authors



13
14
15
16
17
# File 'lib/wlog/commands/fetch_git_commits_standard.rb', line 13

def initialize(from, to)
  @from, @to = from, to
  @author = KeyValue.get('author')
  @repo   = KeyValue.get('git')
end

Instance Attribute Details

#commitsObject

Returns the value of attribute commits.



26
27
28
# File 'lib/wlog/commands/fetch_git_commits_standard.rb', line 26

def commits
  @commits
end

Instance Method Details

#executeObject

Run the parser on the repo; yield commits



20
21
22
23
24
# File 'lib/wlog/commands/fetch_git_commits_standard.rb', line 20

def execute
  cmd = FetchGitCommits.new(@from, @to, @repo, @author)
  cmd.execute
  @commits = cmd.commits
nil end