Method: GitStats::Generator#initialize

Defined in:
lib/git_stats/generator.rb

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

Returns a new instance of Generator.

Yields:

  • (_self)

Yield Parameters:



14
15
16
17
18
19
20
21
22
23
# File 'lib/git_stats/generator.rb', line 14

def initialize(options)
  @path = validate_repo_path(options[:path])
  @out_path = File.expand_path(options[:out_path])

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

  yield self if block_given?
end