class DTK::Common::GritAdapter::FileAccess::DiffMixin::Diffs
Public Class Methods
new(array_diff_hashes)
click to toggle source
Calls superclass method
# File lib/grit_adapter/file_access/diff.rb, line 60 def initialize(array_diff_hashes) super(array_diff_hashes.map{|hash|Diff.new(hash)}) end
Public Instance Methods
ret_summary()
click to toggle source
returns a hash with keys :file_renamed, :file_added, :file_deleted, :file_modified
# File lib/grit_adapter/file_access/diff.rb, line 65 def ret_summary() [:renamed,:added,:deleted,:modified].inject(Summary.new) do |h,cnd| res = map{|diff|diff.send("file_#{cnd}".to_sym)}.compact res.empty? ? h : h.merge("files_#{cnd}".to_sym => res) end end