Class: RuboCop::Git::Commit
- Inherits:
-
Object
- Object
- RuboCop::Git::Commit
- Defined in:
- lib/rubocop/git/commit.rb
Instance Method Summary collapse
- #file_content(filename) ⇒ Object
-
#initialize(options) ⇒ Commit
constructor
ref.
Constructor Details
#initialize(options) ⇒ Commit
[View source]
5 6 7 |
# File 'lib/rubocop/git/commit.rb', line 5 def initialize() @options = end |
Instance Method Details
#file_content(filename) ⇒ Object
[View source]
9 10 11 12 13 14 15 16 17 |
# File 'lib/rubocop/git/commit.rb', line 9 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 |