lib/rubocop/git/commit_file.rb in rubocop-git2-0.1.4 vs lib/rubocop/git/commit_file.rb in rubocop-git2-0.1.5

- old
+ new

@@ -1,8 +1,7 @@ -module RuboCop::Git # c.f. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/commit_file.rb -class CommitFile +class RuboCop::Git::CommitFile def initialize(file, commit) @file = file @commit = commit end @@ -13,15 +12,13 @@ def filename @file.filename end def content - @content ||= begin - unless removed? - @commit.file_content(filename) - end - end + @content ||= unless removed? + @commit.file_content(filename) + end end def relevant_line?(line_number) !modified_line_at(line_number).nil? end @@ -39,9 +36,8 @@ end private def patch - Patch.new(@file.patch) + RuboCop::Git::Patch.new(@file.patch) end -end end