Class: RCheck::Headers::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/rcheck/headers.rb

Instance Method Summary collapse

Instance Method Details

#callObject



16
# File 'lib/rcheck/headers.rb', line 16

def call() [cwd_commit_hash].compact end

#cwd_commit_hashObject



18
19
20
21
# File 'lib/rcheck/headers.rb', line 18

def cwd_commit_hash
  path = File.expand_path File.join(*%w(.git refs heads master))
  File.read(path).chomp if File.file? path
end