Module: MGit::AppData
- Defined in:
- lib/mgit/appdata.rb
Defined Under Namespace
Classes: AppDataVersion, AppDataVersion1, LegacyAppData
Class Method Summary collapse
- .load(key, default = {}) ⇒ Object
- .save!(key, value) ⇒ Object
-
.update ⇒ Object
Module interface #.
Class Method Details
.load(key, default = {}) ⇒ Object
18 19 20 |
# File 'lib/mgit/appdata.rb', line 18 def self.load(key, default = {}) AppDataVersion.latest.load(key, default) end |
.save!(key, value) ⇒ Object
22 23 24 |
# File 'lib/mgit/appdata.rb', line 22 def self.save!(key, value) AppDataVersion.latest.save!(key, value) end |
.update ⇒ Object
Module interface #
10 11 12 13 14 15 16 |
# File 'lib/mgit/appdata.rb', line 10 def self.update if AppDataVersion.active AppDataVersion.updates.each { |u| u.migrate! } else AppDataVersion.latest.setup! end end |