Class: CurrentPrice::Connection
- Includes:
- HTTParty
- Defined in:
- lib/current-price/connection.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Connection
constructor
A new instance of Connection.
- #request(url) ⇒ Object
Methods inherited from Utils
Constructor Details
#initialize(options = {}) ⇒ Connection
Returns a new instance of Connection.
7 8 9 |
# File 'lib/current-price/connection.rb', line 7 def initialize(={}) @options = end |
Instance Method Details
#request(url) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/current-price/connection.rb', line 11 def request(url) begin self.class.get(url).response.body rescue end end |