Class: Nicht::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/nicht/stats.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, search = nil) ⇒ Stats

Returns a new instance of Stats.



5
6
7
8
9
# File 'lib/nicht/stats.rb', line 5

def initialize(path, search = nil)
  @path = "#{path}/**/Gemfile"
  @search = search
  @stats = { per_project: {}, per_gem: {} }
end

Instance Method Details

#renderObject



11
12
13
14
15
16
# File 'lib/nicht/stats.rb', line 11

def render
  Dir[@path].each do |path|
    scan_project path
  end
  output
end