class Google::Auth::Stores::FileTokenStore

Implementation of user token storage backed by a local YAML file

def delete id

(see Google::Auth::Stores::TokenStore#delete)
def delete id
  @store.transaction { @store.delete id }
end

def initialize options = {}

Parameters:
  • file (String, File) --
def initialize options = {}
  super()
  path = options[:file]
  @store = YAML::Store.new path
end

def load id

(see Google::Auth::Stores::TokenStore#load)
def load id
  @store.transaction { @store[id] }
end

def store id, token

(see Google::Auth::Stores::TokenStore#store)
def store id, token
  @store.transaction { @store[id] = token }
end