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.
14 15 16 17 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 14 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.
9 10 11 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 9 def commit @commit end |
#diff_tree ⇒ Object (readonly)
Returns the value of attribute diff_tree.
9 10 11 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 9 def diff_tree @diff_tree end |
Instance Method Details
#dst_size_uncached ⇒ Object
29 30 31 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 29 def dst_size_uncached size(dst_sha1) end |
#src_size_uncached ⇒ Object
25 26 27 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 25 def src_size_uncached size(src_sha1) end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/eac_git/local/commit/changed_file.rb', line 21 def to_s "#{path}|#{status}" end |