require_relative './environment.rb' class Settings < Hash def initialize load self['colorize']=true if(!self.has_key?('colorize')) save end def filename Environment.dev_root + "/dev_tasks.settings.json" end def load if(File.exists?(filename)) hash=JSON.parse(File.read(filename)) hash.each {|k,v| self[k]=v } end end def save File.open(filename,'w'){|f| f.write(JSON.dump(self))} end end