Class: AccessToken

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/authlogic_connect/access_token.rb

Direct Known Subclasses

OauthToken, OpenidToken

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.clientObject



29
30
31
# File 'lib/authlogic_connect/access_token.rb', line 29

def client
  raise "implement client in subclass"
end

.configObject



41
42
43
44
# File 'lib/authlogic_connect/access_token.rb', line 41

def config
  @settings ||= {}
  @settings.dup
end

.consumerObject



33
34
35
# File 'lib/authlogic_connect/access_token.rb', line 33

def consumer
  raise "implement consumer in subclass"
end

.service_nameObject



25
26
27
# File 'lib/authlogic_connect/access_token.rb', line 25

def service_name
  @service_name ||= self.to_s.underscore.scan(/^(.*?)(_token)?$/)[0][0].to_sym
end

.settings(site, hash = {}) ⇒ Object



37
38
39
# File 'lib/authlogic_connect/access_token.rb', line 37

def settings(site, hash = {})
  @settings = hash.merge(:site => site)
end

Instance Method Details

#clientObject



4
5
6
# File 'lib/authlogic_connect/access_token.rb', line 4

def client
  self.class.client
end

#consumerObject



8
9
10
# File 'lib/authlogic_connect/access_token.rb', line 8

def consumer
  self.class.consumer
end

#get(path) ⇒ Object



20
21
22
# File 'lib/authlogic_connect/access_token.rb', line 20

def get(path)
  
end

#service_nameObject



12
13
14
# File 'lib/authlogic_connect/access_token.rb', line 12

def service_name
  self.class.service_name
end

#settingsObject



16
17
18
# File 'lib/authlogic_connect/access_token.rb', line 16

def settings
  self.class.settings
end