Class: OauthActiveResource::Base
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- OauthActiveResource::Base
- Defined in:
- lib/oauth-activeresource.rb
Constant Summary collapse
- @@oauth_connection =
nil
Class Method Summary collapse
- .connection(refresh = false) ⇒ Object
- .oauth_connection ⇒ Object
- .oauth_connection=(connection) ⇒ Object
Instance Method Summary collapse
Class Method Details
.connection(refresh = false) ⇒ Object
14 15 16 17 18 |
# File 'lib/oauth-activeresource.rb', line 14 def self.connection(refresh = false) @connection = Connection.new(@@oauth_connection, site,format) if @connection.nil? || refresh @connection.timeout = timeout if timeout return @connection end |
.oauth_connection ⇒ Object
10 11 12 |
# File 'lib/oauth-activeresource.rb', line 10 def self.oauth_connection @@oauth_connection end |
.oauth_connection=(connection) ⇒ Object
6 7 8 |
# File 'lib/oauth-activeresource.rb', line 6 def self.oauth_connection= connection @@oauth_connection = connection end |
Instance Method Details
#format=(mime_type_reference_or_format) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/oauth-activeresource.rb', line 20 def format=(mime_type_reference_or_format) format = mime_type_reference_or_format.is_a?(Symbol) ? OauthActiveResource::Formats[mime_type_reference_or_format] : mime_type_reference_or_format self._format = format connection.format = format if site end |