Module: Meer::Datameer::Session
- Defined in:
- lib/meer/datameer.rb
Constant Summary collapse
- SESSION_FILE =
File.('~/.dmsession')
Class Method Summary collapse
Class Method Details
.load ⇒ Object
84 85 86 |
# File 'lib/meer/datameer.rb', line 84 def self.load File.read(SESSION_FILE) if File.exist?(SESSION_FILE) end |
.set(cookie) ⇒ Object
78 79 80 81 82 |
# File 'lib/meer/datameer.rb', line 78 def self.set() FileUtils.rm_f SESSION_FILE File.open(SESSION_FILE, 'w') { |f| f.puts } File.chmod(0400, SESSION_FILE) end |