Skip to content

Instantly share code, notes, and snippets.

View PeterCamilleri's full-sized avatar

Peter Camilleri PeterCamilleri

View GitHub Profile
@mehdi-farsi
mehdi-farsi / rails_project_loc.rb
Last active February 9, 2024 07:13
Count the lines of code of a rails project - in pure Ruby
# Workflow:
#
# 1- if the path points to a directory
# 1.1- if the directory isn't in the exclusion list then: count LOC
# 1.2- else: prune directory
# 2- else
# 1.1- if the file extension is whitelisted then: count LOC
# 1.2- else: next
require 'find'