Class: CurrentPrice::Connection

Inherits:
Utils
  • Object
show all
Includes:
HTTParty
Defined in:
lib/current-price/connection.rb

Direct Known Subclasses

Google::Client, Yahoo::Client

Instance Method Summary collapse

Methods inherited from Utils

#underscore

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={})
  @options = 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