class GareEnDirect::HttpClient
Constants
- URL
Public Class Methods
new()
click to toggle source
# File lib/GareEnDirect/http_client.rb, line 7 def initialize end
Public Instance Methods
get(path)
click to toggle source
# File lib/GareEnDirect/http_client.rb, line 11 def get(path) begin response = Excon.get(URL + path) @doc = Nokogiri::HTML(response.body) rescue => e raise 'ERROR FETCHING OR PARSING' end end
method_missing(m, *args, &block)
click to toggle source
# File lib/GareEnDirect/http_client.rb, line 20 def method_missing(m, *args, &block) @doc.send(m, *args) end