Class: Token
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Token
- Defined in:
- lib/authlogic_connect/token.rb
Direct Known Subclasses
Class Method Summary collapse
- .client ⇒ Object
- .config ⇒ Object
- .consumer ⇒ Object
- .service_name ⇒ Object
- .settings(site, hash = {}) ⇒ Object
Instance Method Summary collapse
Class Method Details
.client ⇒ Object
29 30 31 |
# File 'lib/authlogic_connect/token.rb', line 29 def client raise "implement client in subclass" end |
.config ⇒ Object
41 42 43 44 |
# File 'lib/authlogic_connect/token.rb', line 41 def config @settings ||= {} @settings.dup end |
.consumer ⇒ Object
33 34 35 |
# File 'lib/authlogic_connect/token.rb', line 33 def consumer raise "implement consumer in subclass" end |
.service_name ⇒ Object
25 26 27 |
# File 'lib/authlogic_connect/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/token.rb', line 37 def settings(site, hash = {}) @settings = hash.merge(:site => site) end |
Instance Method Details
#client ⇒ Object
4 5 6 |
# File 'lib/authlogic_connect/token.rb', line 4 def client self.class.client end |
#consumer ⇒ Object
8 9 10 |
# File 'lib/authlogic_connect/token.rb', line 8 def consumer self.class.consumer end |
#get(path) ⇒ Object
20 21 22 |
# File 'lib/authlogic_connect/token.rb', line 20 def get(path) end |
#service_name ⇒ Object
12 13 14 |
# File 'lib/authlogic_connect/token.rb', line 12 def service_name self.class.service_name end |
#settings ⇒ Object
16 17 18 |
# File 'lib/authlogic_connect/token.rb', line 16 def settings self.class.settings end |