Class: StudFinder::LocCounter

Inherits:
Object
  • Object
show all
Defined in:
lib/stud_finder/loc_counter.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo_path:, files:) ⇒ LocCounter

Returns a new instance of LocCounter.



5
6
7
8
# File 'lib/stud_finder/loc_counter.rb', line 5

def initialize(repo_path:, files:)
  @repo_path = File.expand_path(repo_path)
  @files = files
end

Instance Method Details

#callObject



10
11
12
# File 'lib/stud_finder/loc_counter.rb', line 10

def call
  @files.to_h { |file| [file, non_blank_lines(file)] }
end