enumerable method
# File lib/git/status.rb, line 44 def [](file) @files[file] end
# File lib/git/status.rb, line 15 def added @files.select { |k, f| f.type == 'A' } end
# File lib/git/status.rb, line 11 def changed @files.select { |k, f| f.type == 'M' } end
# File lib/git/status.rb, line 19 def deleted @files.select { |k, f| f.type == 'D' } end
# File lib/git/status.rb, line 48 def each(&block) @files.values.each(&block) end
# File lib/git/status.rb, line 27 def pretty out = '' self.each do |file| out << file.path out << "\n\tsha(r) " + file.sha_repo.to_s + ' ' + file.mode_repo.to_s out << "\n\tsha(i) " + file.sha_index.to_s + ' ' + file.mode_index.to_s out << "\n\ttype " + file.type.to_s out << "\n\tstage " + file.stage.to_s out << "\n\tuntrac " + file.untracked.to_s out << "\n" end out << "\n" out end
Generated with the Darkfish Rdoc Generator 2.