Class: Avm::Git::Commit::File

Inherits:
Object
  • Object
show all
Includes:
EacRubyUtils::SimpleCache
Defined in:
lib/avm/git/commit/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(git, diff_tree_line) ⇒ File

git: [EacLauncher::Git::Base] diff_tree_tree: a line of command “git diff-tree –no-commit-id -r –full-index”‘s output



17
18
19
20
# File 'lib/avm/git/commit/file.rb', line 17

def initialize(git, diff_tree_line)
  @git = git
  @diff_tree = ::Avm::Git::Commit::DiffTreeLine.new(diff_tree_line)
end

Instance Attribute Details

#diff_treeObject (readonly)

Returns the value of attribute diff_tree.



13
14
15
# File 'lib/avm/git/commit/file.rb', line 13

def diff_tree
  @diff_tree
end

#gitObject (readonly)

Returns the value of attribute git.



13
14
15
# File 'lib/avm/git/commit/file.rb', line 13

def git
  @git
end

Instance Method Details

#dst_size_uncachedObject



32
33
34
# File 'lib/avm/git/commit/file.rb', line 32

def dst_size_uncached
  size(dst_sha1)
end

#src_size_uncachedObject



28
29
30
# File 'lib/avm/git/commit/file.rb', line 28

def src_size_uncached
  size(src_sha1)
end

#to_sObject



24
25
26
# File 'lib/avm/git/commit/file.rb', line 24

def to_s
  "#{path}|#{status}"
end