Class: Smooth::Backends::RestClient
- Inherits:
-
Object
- Object
- Smooth::Backends::RestClient
- Defined in:
- lib/smooth/backends/rest_client.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RestClient
constructor
A new instance of RestClient.
- #query(params = {}) ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RestClient
Returns a new instance of RestClient.
5 6 7 |
# File 'lib/smooth/backends/rest_client.rb', line 5 def initialize ={} end |
Instance Method Details
#query(params = {}) ⇒ Object
9 10 11 |
# File 'lib/smooth/backends/rest_client.rb', line 9 def query params={} response = Typhoeus::Request.get(url_with_query_string(params)) end |
#url ⇒ Object
13 14 15 |
# File 'lib/smooth/backends/rest_client.rb', line 13 def url @options[:url] end |