Method: PreCommit::Installer#templates
- Defined in:
- lib/pre-commit/installer.rb
#templates ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/pre-commit/installer.rb', line 45 def templates @templates ||= begin pattern = File.join(TEMPLATE_DIR, "*") Dir.glob(pattern).inject({}) do |hash, file| key = file.match(/\/([^\/]+?)$/)[1] hash[key] = file hash end end end |