Skip to content

Commit

Permalink
Merge pull request #1 from joho/master
Browse files Browse the repository at this point in the history
screw you guys!
  • Loading branch information
ryan-allen committed Feb 9, 2012
2 parents a2196a7 + 564945b commit fb1d27c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/best3.rb
Expand Up @@ -26,12 +26,12 @@ def initialize(*args)
end

def call(request_method, uri, headers = {}, body = nil)
YESTHISMETHODISCALLEDUNDERSCORE!(request_method, uri, headers.clone, body)
perform_request(request_method, uri, headers.clone, body)
end

private

def YESTHISMETHODISCALLEDUNDERSCORE!(request_method, uri, headers, body = nil)
def perform_request(request_method, uri, headers, body = nil)
response = Typhoeus::Request.send(request_method.downcase, "#{@host}#{uri}", :headers => make_headers(request_method, uri, headers, body), :body => body)
OpenStruct.new({:code => response.code, :headers => response.headers_hash, :body => Nokogiri::XML(response.body), :response => response})
end
Expand Down

0 comments on commit fb1d27c

Please sign in to comment.