Class: Wl::Dotwl
- Inherits:
-
Object
- Object
- Wl::Dotwl
- Defined in:
- lib/wl/dotwl.rb
Instance Method Summary collapse
Instance Method Details
#dir ⇒ Object
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 login(login) File.write(token_path, login.token) File.chmod(0600, token_path) end |
#token ⇒ Object
12 13 14 |
# File 'lib/wl/dotwl.rb', line 12 def token File.read(token_path) rescue nil end |