# File lib/preferences.rb, line 36 def Preferences.dir unless @dir case RUBY_PLATFORM when /win32/ @dir = ENV['APPDATA'] || # C:\Documents and Settings\name\Application Data ENV['USERPROFILE'] || # C:\Documents and Settings\name ENV['HOME'] else @dir = ENV['HOME'] || File.expand_path('~') end unless @dir raise EnvError, "Can't determine a preferences directory." end end @dir end