0

I need to create a gem, for my own use, that substitutes the current 'libnotify' gem as I find it unusable to have my testing notifications queued one after the other. I'll use dbus-send to create the notifications, and get their ID. Now I need some way of storing this ID between each code run so that I can retrieve it when a new notification is created and replace the notification instead of queuing a new one.

So how and where do I store this temporary data with my gem? All it needs is a simple scratch file, but it's not one I can delete after use. What would the best practise be for this?

Rahul Sekhar
  • 2,761
  • 5
  • 23
  • 27

1 Answers1

1

One common idiom is to use an hidden folder in your home directory.

~/.mygem/data
Oscar Del Ben
  • 4,485
  • 1
  • 27
  • 41