Class: EacGit::Local::Commit::ChangedFile
- Inherits:
-
Object
- Object
- EacGit::Local::Commit::ChangedFile
- Defined in:
- lib/eac_git/local/commit/changed_file.rb
Instance Attribute Summary collapse
-
#commit ⇒ Object
readonly
Returns the value of attribute commit.
-
#diff_tree ⇒ Object
readonly
Returns the value of attribute diff_tree.
Instance Method Summary collapse
- #dst_size_uncached ⇒ Object
-
#initialize(commit, diff_tree_line) ⇒ ChangedFile
constructor
A new instance of ChangedFile.
- #src_size_uncached ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(commit, diff_tree_line) ⇒ ChangedFile
Returns a new instance of ChangedFile.
17 18 19 20 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 17 def initialize(commit, diff_tree_line) @commit = commit @diff_tree = ::EacGit::Local::Commit::DiffTreeLine.new(diff_tree_line) end |
Instance Attribute Details
#commit ⇒ Object (readonly)
Returns the value of attribute commit.
12 13 14 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 12 def commit @commit end |
#diff_tree ⇒ Object (readonly)
Returns the value of attribute diff_tree.
12 13 14 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 12 def diff_tree @diff_tree end |
Instance Method Details
#dst_size_uncached ⇒ Object
32 33 34 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 32 def dst_size_uncached size(dst_sha1) end |
#src_size_uncached ⇒ Object
28 29 30 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 28 def src_size_uncached size(src_sha1) end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 24 def to_s "#{path}|#{status}" end |