Class: Paytunia::ConnectionWrappers::OAuthWrapper
- Inherits:
-
Object
- Object
- Paytunia::ConnectionWrappers::OAuthWrapper
- Defined in:
- lib/paytunia/connection_wrappers/oauth_wrapper.rb
Instance Attribute Summary collapse
-
#site ⇒ Object
readonly
Returns the value of attribute site.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #get(path) ⇒ Object
-
#initialize(token, site) ⇒ OAuthWrapper
constructor
A new instance of OAuthWrapper.
Constructor Details
#initialize(token, site) ⇒ OAuthWrapper
Returns a new instance of OAuthWrapper.
6 7 8 9 |
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 6 def initialize(token, site) @token = token @site = site end |
Instance Attribute Details
#site ⇒ Object (readonly)
Returns the value of attribute site.
4 5 6 |
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 4 def site @site end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 4 def token @token end |
Instance Method Details
#get(path) ⇒ Object
11 12 13 |
# File 'lib/paytunia/connection_wrappers/oauth_wrapper.rb', line 11 def get(path) JSON.parse(token.get(@site + path).body) end |