Sha256: 63536270674bf1e08b22771d7939b74f7a33a28a1b173a9774d4ff4a38857139
Contents?: true
Size: 636 Bytes
Versions: 2
Compression:
Stored size: 636 Bytes
Contents
# -*- encoding : utf-8 -*- module GitStats class Generator delegate :add_command_observer, to: :@repo delegate :render_all, to: :@view def initialize(repo_path, out_path) validate_repo_path(repo_path) @repo = GitData::Repo.new(path: repo_path) view_data = StatsView::ViewData.new(@repo) @view = StatsView::View.new(view_data, out_path) yield self if block_given? end private def validate_repo_path(repo_path) raise ArgumentError, "#{repo_path} is not a git repository" unless (Dir.exists?("#{repo_path}/.git") || File.exists?("#{repo_path}/HEAD")) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
git_stats-1.0.5 | lib/git_stats/generator.rb |
git_stats-1.0.4 | lib/git_stats/generator.rb |