Class: Infuser::TokenRefresher
- Inherits:
-
Object
- Object
- Infuser::TokenRefresher
- Defined in:
- lib/infuser/token_refresher.rb
Instance Attribute Summary collapse
-
#refresh_token ⇒ Object
readonly
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(refresh_token) ⇒ TokenRefresher
constructor
A new instance of TokenRefresher.
- #refresh ⇒ Object
Constructor Details
#initialize(refresh_token) ⇒ TokenRefresher
Returns a new instance of TokenRefresher.
10 11 12 |
# File 'lib/infuser/token_refresher.rb', line 10 def initialize refresh_token @refresh_token = refresh_token end |
Instance Attribute Details
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
8 9 10 |
# File 'lib/infuser/token_refresher.rb', line 8 def refresh_token @refresh_token end |
Instance Method Details
#refresh ⇒ Object
14 15 16 17 |
# File 'lib/infuser/token_refresher.rb', line 14 def refresh resource = RestClient::Resource.new(endpoint, Infuser::Configuration.api_key, Infuser::Configuration.api_secret) JSON.parse resource.post(params) end |