Class: PolyglotFlutter::IO::Token
- Inherits:
-
Object
- Object
- PolyglotFlutter::IO::Token
- Defined in:
- lib/flutter_polyglot_cli/io/token.rb
Constant Summary collapse
- KEYCHAIN_SERVICE =
'polyglot'
- KEYCHAIN_TOKEN_KEY =
'polyglot_token'
Class Method Summary collapse
Class Method Details
.keychain ⇒ Object
16 17 18 |
# File 'lib/flutter_polyglot_cli/io/token.rb', line 16 def keychain @keychain ||= OSXKeychain.new end |
.read ⇒ Object
12 13 14 |
# File 'lib/flutter_polyglot_cli/io/token.rb', line 12 def read keychain[KEYCHAIN_SERVICE, KEYCHAIN_TOKEN_KEY] end |
.write(token) ⇒ Object
8 9 10 |
# File 'lib/flutter_polyglot_cli/io/token.rb', line 8 def write(token) keychain[KEYCHAIN_SERVICE, KEYCHAIN_TOKEN_KEY] = token end |