class YAVM::Stores::GenericJSON
Public Instance Methods
data()
click to toggle source
# File lib/yavm/stores/base.rb, line 26 def data @data ||= JSON.parse(IO.read(filename)) end
set!(new_version)
click to toggle source
# File lib/yavm/stores/base.rb, line 34 def set!(new_version) @data = update_version_key(new_version.to_s) File.open(filename, 'w') { |f| f.write JSON.pretty_generate(data) } end
to_version()
click to toggle source
# File lib/yavm/stores/base.rb, line 30 def to_version Version.new(self, version_key) end