Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

62 lines (45 sloc) 0.963 kb
class AccessToken < ActiveRecord::Base
belongs_to :user
def client
self.class.client
end
def consumer
self.class.consumer
end
def service_name
self.class.service_name
end
def settings
self.class.settings
end
def config
self.class.config
end
def get(path)
end
class << self
def service_name
@service_name ||= self.to_s.underscore.scan(/^(.*?)(_token)?$/)[0][0].to_sym
end
def client
raise "implement client in subclass"
end
def consumer
raise "implement consumer in subclass"
end
def settings(site, hash = {})
@settings = hash.merge(:site => site)
end
def config
@settings ||= {}
@settings.dup
end
def api_version(value = nil)
config[:api]
end
protected
def credentials
@credentials ||= AuthlogicConnect.credentials(service_name)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.