Class: Wl::Dotwl

Inherits:
Object
  • Object
show all
Defined in:
lib/wl/dotwl.rb

Instance Method Summary collapse

Instance Method Details

#dirObject



8
9
10
# File 'lib/wl/dotwl.rb', line 8

def dir
  FileUtils.mkdir_p("#{Dir.home}/.wl", mode: 0700).last
end

#login(login) ⇒ Object



3
4
5
6
# File 'lib/wl/dotwl.rb', line 3

def ()
  File.write(token_path, .token)
  File.chmod(0600, token_path)
end

#tokenObject



12
13
14
# File 'lib/wl/dotwl.rb', line 12

def token
  File.read(token_path) rescue nil
end