Class: StudFinder::LocCounter
- Inherits:
-
Object
- Object
- StudFinder::LocCounter
- Defined in:
- lib/stud_finder/loc_counter.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(repo_path:, files:) ⇒ LocCounter
constructor
A new instance of LocCounter.
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.(repo_path) @files = files end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/stud_finder/loc_counter.rb', line 10 def call @files.to_h { |file| [file, non_blank_lines(file)] } end |