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
19 20 21 |
# File 'lib/mgit/appdata.rb', line 19 def self.load(key, default = {}) AppDataVersion.latest.load(key, default) end |
.save!(key, value) ⇒ Object
23 24 25 |
# File 'lib/mgit/appdata.rb', line 23 def self.save!(key, value) AppDataVersion.latest.save!(key, value) end |
.update ⇒ Object
Module interface #
11 12 13 14 15 16 17 |
# File 'lib/mgit/appdata.rb', line 11 def self.update if AppDataVersion.active AppDataVersion.updates.each { |u| u.migrate! } else AppDataVersion.latest.setup! end end |