Sha256: 0f695e2c173032936b92098954a1bf6ebab075e9d04fa5c466bbc36a07dc9aab
Contents?: true
Size: 854 Bytes
Versions: 13
Compression:
Stored size: 854 Bytes
Contents
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 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 protected def credentials @credentials ||= AuthlogicConnect.credentials(service_name) end end end
Version data entries
13 entries across 13 versions & 3 rubygems