Class: Yobi::DiffChange
Overview
One "change" message from a diff run. #modifier is Restic's own
concatenation of single-character codes: +"+"+ added, "-" removed,
"U" metadata updated, "M" content modified, "T" type changed,
"?" bitrot detected.
Instance Method Summary
collapse
Methods inherited from FancyHash
#initialize, #inspect, #pretty_print
Instance Method Details
#added? ⇒ Boolean
69
70
71
|
# File 'lib/yobi/repository/diff.rb', line 69
def added?
modifier.include?("+")
end
|
#bitrot? ⇒ Boolean
89
90
91
|
# File 'lib/yobi/repository/diff.rb', line 89
def bitrot?
modifier.include?("?")
end
|
85
86
87
|
# File 'lib/yobi/repository/diff.rb', line 85
def metadata_updated?
modifier.include?("U")
end
|
#modified? ⇒ Boolean
81
82
83
|
# File 'lib/yobi/repository/diff.rb', line 81
def modified?
modifier.include?("M")
end
|
#modifier ⇒ String
65
66
67
|
# File 'lib/yobi/repository/diff.rb', line 65
def modifier
self["modifier"]
end
|
#path ⇒ String
61
62
63
|
# File 'lib/yobi/repository/diff.rb', line 61
def path
self["path"]
end
|
#removed? ⇒ Boolean
73
74
75
|
# File 'lib/yobi/repository/diff.rb', line 73
def removed?
modifier.include?("-")
end
|
#type_changed? ⇒ Boolean
77
78
79
|
# File 'lib/yobi/repository/diff.rb', line 77
def type_changed?
modifier.include?("T")
end
|