class Google::Auth::Stores::FileTokenStore
Implementation of user token storage backed by a local YAML file
Public Class Methods
Source
# File lib/googleauth/stores/file_token_store.rb, line 27 def initialize options = {} super() path = options[:file] @store = YAML::Store.new path end
Create a new store with the supplied file.
@param [String, File] file
Path to storage file
Calls superclass method
Public Instance Methods
Source
# File lib/googleauth/stores/file_token_store.rb, line 44 def delete id @store.transaction { @store.delete id } end
(see Google::Auth::Stores::TokenStore#delete)
Source
# File lib/googleauth/stores/file_token_store.rb, line 34 def load id @store.transaction { @store[id] } end
(see Google::Auth::Stores::TokenStore#load)
Source
# File lib/googleauth/stores/file_token_store.rb, line 39 def store id, token @store.transaction { @store[id] = token } end
(see Google::Auth::Stores::TokenStore#store)