Class: GitSleep::CredentialsFile
- Inherits:
-
Object
- Object
- GitSleep::CredentialsFile
- Includes:
- Singleton
- Defined in:
- lib/git-sleep/credentials_file.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
11 12 13 14 15 16 |
# File 'lib/git-sleep/credentials_file.rb', line 11 def destroy File.delete(path) true rescue Errno::ENOENT false end |
#path ⇒ Object
18 19 20 |
# File 'lib/git-sleep/credentials_file.rb', line 18 def path @path ||= File.('~/.netrc') end |
#present? ⇒ Boolean
7 8 9 |
# File 'lib/git-sleep/credentials_file.rb', line 7 def present? File.exist?(path) end |