class POChange
Attributes
commit_hash[RW]
curr[RW]
name[RW]
prev[RW]
time[RW]
Public Class Methods
from_diff(commit,diff)
click to toggle source
# File lib/transparent_git/repo.rb, line 23 def self.from_diff(commit,diff) new(:curr => diff.b_blob.andand.data.andand.stripped_chars, :prev => diff.a_blob.andand.data.andand.stripped_chars, :name => diff.a_path, :time => commit.committed_date, :commit_hash => commit.id) end
Public Instance Methods
to_json()
click to toggle source
# File lib/transparent_git/repo.rb, line 20 def to_json {:curr => curr.andand.strip, :prev => prev.andand.strip, :file => name, :time => time, :commit_hash => commit_hash} end
to_s()
click to toggle source
# File lib/transparent_git/repo.rb, line 17 def to_s "#{name}: #{prev.andand.strip}|#{curr.andand.strip}" end