Class: TwitterAuth::Dispatcher::Oauth
- Inherits:
-
OAuth::AccessToken
- Object
- OAuth::AccessToken
- TwitterAuth::Dispatcher::Oauth
- Includes:
- Shared
- Defined in:
- lib/twitter_auth/dispatcher/oauth.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user) ⇒ Oauth
constructor
A new instance of Oauth.
- #request(http_method, path, *arguments) ⇒ Object
Methods included from Shared
#append_extension_to, #handle_response, #post!
Constructor Details
#initialize(user) ⇒ Oauth
Returns a new instance of Oauth.
10 11 12 13 14 |
# File 'lib/twitter_auth/dispatcher/oauth.rb', line 10 def initialize(user) raise TwitterAuth::Error, 'Dispatcher must be initialized with a User.' unless user.is_a?(TwitterAuth::OauthUser) self.user = user super(TwitterAuth.consumer, user.access_token, user.access_secret) end |
Instance Attribute Details
#user ⇒ Object
Returns the value of attribute user.
8 9 10 |
# File 'lib/twitter_auth/dispatcher/oauth.rb', line 8 def user @user end |
Instance Method Details
#request(http_method, path, *arguments) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/twitter_auth/dispatcher/oauth.rb', line 16 def request(http_method, path, *arguments) path = TwitterAuth.path_prefix + path path = append_extension_to(path) response = super handle_response(response) end |