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