module Gist::ClipboardError::AuthTokenFile
helper module for authentication token actions
Public Class Methods
Source
# File lib/gist.rb, line 49 def self.filename if ENV.key?(URL_ENV_NAME) File.expand_path "~/.gist.#{ENV[URL_ENV_NAME].gsub(/:/, '.').gsub(/[^a-z0-9.-]/, '')}" else File.expand_path "~/.gist" end end
Source
# File lib/gist.rb, line 61 def self.write(token) File.open(filename, 'w', 0600) do |f| f.write token end end