def save_local
      ensure_read_only!
      self.path ||= Doggy.object_root.join("#{prefix}-#{id}.json")
      File.open(@path, 'w') { |f| f.write(JSON.pretty_generate(to_h)) }
    end
def save_local
      ensure_read_only!
      self.path ||= Doggy.object_root.join("#{prefix}-#{id}.json")
      File.open(@path, 'w') { |f| f.write(JSON.pretty_generate(to_h)) }
    end
class << self