Sha256: e97583090de95f0a4120a618f910b2f4d18e992e7b54454568206d77fbfb7d97
Contents?: true
Size: 421 Bytes
Versions: 7
Compression:
Stored size: 421 Bytes
Contents
require 'yaml' module IRKit module App DATA_FILE = ENV["IRKIT_DATA_FILE"] || File.expand_path('.irkit.json', ENV['HOME']) if File.exists?(DATA_FILE) Data = Hashie::Mash.new JSON.parse(File.open(DATA_FILE).read) else Data = Hashie::Mash.new("IR" => {}, "Device" => {}) end def Data.save File.open DATA_FILE, "w+" do |f| f.write self.to_json end end end end
Version data entries
7 entries across 7 versions & 1 rubygems