Class: AccessToken
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AccessToken
- Defined in:
- lib/authlogic_connect/access_token.rb
Direct Known Subclasses
Class Method Summary collapse
- .api_version(value = nil) ⇒ Object
- .client ⇒ Object
- .config ⇒ Object
- .consumer ⇒ Object
- .service_name ⇒ Object
- .settings(site, hash = {}) ⇒ Object
Instance Method Summary collapse
- #client ⇒ Object
- #config ⇒ Object
- #consumer ⇒ Object
- #get(path) ⇒ Object
- #service_name ⇒ Object
- #settings ⇒ Object
Class Method Details
.api_version(value = nil) ⇒ Object
50 51 52 |
# File 'lib/authlogic_connect/access_token.rb', line 50 def api_version(value = nil) config[:api] end |
.client ⇒ Object
33 34 35 |
# File 'lib/authlogic_connect/access_token.rb', line 33 def client raise "implement client in subclass" end |
.config ⇒ Object
45 46 47 48 |
# File 'lib/authlogic_connect/access_token.rb', line 45 def config @settings ||= {} @settings.dup end |
.consumer ⇒ Object
37 38 39 |
# File 'lib/authlogic_connect/access_token.rb', line 37 def consumer raise "implement consumer in subclass" end |
.service_name ⇒ Object
29 30 31 |
# File 'lib/authlogic_connect/access_token.rb', line 29 def service_name @service_name ||= self.to_s.underscore.scan(/^(.*?)(_token)?$/)[0][0].to_sym end |
.settings(site, hash = {}) ⇒ Object
41 42 43 |
# File 'lib/authlogic_connect/access_token.rb', line 41 def settings(site, hash = {}) @settings = hash.merge(:site => site) end |
Instance Method Details
#client ⇒ Object
4 5 6 |
# File 'lib/authlogic_connect/access_token.rb', line 4 def client self.class.client end |
#config ⇒ Object
20 21 22 |
# File 'lib/authlogic_connect/access_token.rb', line 20 def config self.class.config end |
#consumer ⇒ Object
8 9 10 |
# File 'lib/authlogic_connect/access_token.rb', line 8 def consumer self.class.consumer end |
#get(path) ⇒ Object
24 25 26 |
# File 'lib/authlogic_connect/access_token.rb', line 24 def get(path) end |
#service_name ⇒ Object
12 13 14 |
# File 'lib/authlogic_connect/access_token.rb', line 12 def service_name self.class.service_name end |
#settings ⇒ Object
16 17 18 |
# File 'lib/authlogic_connect/access_token.rb', line 16 def settings self.class.settings end |