Module: MGit::AppData

Defined in:
lib/mgit/appdata.rb

Defined Under Namespace

Classes: AppDataVersion, AppDataVersion1, LegacyAppData

Class Method Summary collapse

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

.updateObject

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