class RuboCop::Git::Commit
ref. github.com/thoughtbot/hound/blob/d2f3933/app/models/commit.rb
Public Class Methods
new(options)
click to toggle source
# File lib/rubocop/git/commit.rb, line 7 def initialize(options) @options = options end
Public Instance Methods
file_content(filename)
click to toggle source
# File lib/rubocop/git/commit.rb, line 11 def file_content(filename) if @options.cached `git show :#{filename.shellescape}` elsif @options.commit_last `git show #{@options.commit_last.shellescape}:#{filename.shellescape}` else File.read(filename) end end