module Pasting::AuthTokenFile

helper module for authentication token actions

Public Class Methods

filename() click to toggle source
# File lib/pasting.rb, line 31
def self.filename
    File.expand_path "~/.pastingKey"
end
read() click to toggle source
# File lib/pasting.rb, line 35
def self.read
  File.read(filename).chomp
end
write(token) click to toggle source
# File lib/pasting.rb, line 39
def self.write(token)
  File.open(filename, 'w', 0600) do |f|
    f.write token
  end
end