Class: Ryext::Request
- Inherits:
-
Object
- Object
- Ryext::Request
- Defined in:
- lib/ryext/request.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
- #api_key? ⇒ Boolean
-
#initialize(account, query, method = 'GET') ⇒ Request
constructor
A new instance of Request.
- #raw_response ⇒ Object
- #response ⇒ Object
Constructor Details
#initialize(account, query, method = 'GET') ⇒ Request
Returns a new instance of Request.
5 6 7 8 9 |
# File 'lib/ryext/request.rb', line 5 def initialize(account, query, method = 'GET') @account = account @query = query @method = method end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
3 4 5 |
# File 'lib/ryext/request.rb', line 3 def account @account end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/ryext/request.rb', line 3 def method @method end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/ryext/request.rb', line 3 def query @query end |
Instance Method Details
#api_key? ⇒ Boolean
19 20 21 |
# File 'lib/ryext/request.rb', line 19 def api_key? !account.api_key.nil? end |
#raw_response ⇒ Object
15 16 17 |
# File 'lib/ryext/request.rb', line 15 def raw_response api_key? && request_response end |