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
86
87
88
|
# File 'lib/yobi/repository/diff.rb', line 86
def added?
modifier.include?("+")
end
|
#bitrot? ⇒ Boolean
111
112
113
|
# File 'lib/yobi/repository/diff.rb', line 111
def bitrot?
modifier.include?("?")
end
|
106
107
108
|
# File 'lib/yobi/repository/diff.rb', line 106
def metadata_updated?
modifier.include?("U")
end
|
#modified? ⇒ Boolean
101
102
103
|
# File 'lib/yobi/repository/diff.rb', line 101
def modified?
modifier.include?("M")
end
|
#modifier ⇒ String
81
82
83
|
# File 'lib/yobi/repository/diff.rb', line 81
def modifier
self["modifier"]
end
|
#path ⇒ String
76
77
78
|
# File 'lib/yobi/repository/diff.rb', line 76
def path
self["path"]
end
|
#removed? ⇒ Boolean
91
92
93
|
# File 'lib/yobi/repository/diff.rb', line 91
def removed?
modifier.include?("-")
end
|
#type_changed? ⇒ Boolean
96
97
98
|
# File 'lib/yobi/repository/diff.rb', line 96
def type_changed?
modifier.include?("T")
end
|