Class: GitStats::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/git_stats/generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) {|_self| ... } ⇒ Generator

Returns a new instance of Generator.

Yields:

  • (_self)

Yield Parameters:

[View source]

7
8
9
10
11
12
13
14
15
# File 'lib/git_stats/generator.rb', line 7

def initialize(options)
  validate_repo_path(options[:path])

  @repo = GitData::Repo.new(options)
  view_data = StatsView::ViewData.new(@repo)
  @view = StatsView::View.new(view_data, options[:out_path])

  yield self if block_given?
end