Implementation of user token storage backed by a local YAML file
Create a new store with the supplied file.
@param [String, File] file
Path to storage file
# File lib/googleauth/stores/file_token_store.rb, line 42 def initialize(options = {}) path = options[:file] @store = YAML::Store.new(path) end
(see Google::Auth::Stores::TokenStore#delete)
# File lib/googleauth/stores/file_token_store.rb, line 58 def delete(id) @store.transaction { @store.delete(id) } end
(see Google::Auth::Stores::TokenStore#load)
# File lib/googleauth/stores/file_token_store.rb, line 48 def load(id) @store.transaction { @store[id] } end
(see Google::Auth::Stores::TokenStore#store)
# File lib/googleauth/stores/file_token_store.rb, line 53 def store(id, token) @store.transaction { @store[id] = token } end