Class: GitStats::Generator
- Inherits:
-
Object
- Object
- GitStats::Generator
- Includes:
- Inspector
- Defined in:
- lib/git_stats/generator.rb
Instance Attribute Summary collapse
-
#out_path ⇒ Object
readonly
Returns the value of attribute out_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(options) {|_self| ... } ⇒ Generator
constructor
A new instance of Generator.
Methods included from Inspector
#inspect, #pretty_print, #to_s
Constructor Details
#initialize(options) {|_self| ... } ⇒ Generator
Returns a new instance of Generator.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/git_stats/generator.rb', line 14 def initialize() @path = validate_repo_path([:path]) @out_path = File.([:out_path]) @repo = GitData::Repo.new(.merge(path: path)) view_data = StatsView::ViewData.new(@repo) @view = StatsView::View.new(view_data, out_path) yield self if block_given? end |
Instance Attribute Details
#out_path ⇒ Object (readonly)
Returns the value of attribute out_path.
12 13 14 |
# File 'lib/git_stats/generator.rb', line 12 def out_path @out_path end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
12 13 14 |
# File 'lib/git_stats/generator.rb', line 12 def path @path end |