Browse files

fixed tabs

  • Loading branch information...
1 parent 6f16ee8 commit 78ba32da5f5394128eccf2bac06de2d379810e7c @phuphighter committed May 11, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/fred.rb
View
8 lib/fred.rb
@@ -7,18 +7,18 @@
module Fred
def self.fred(parent, child, options={})
if secondary.nil?
- response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
+ response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
else
- response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}/#{child}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
+ response = HTTParty.get("http://api.stlouisfed.org/fred/#{parent}/#{child}?#{hash_to_query(options)}&api_key=#{FRED_API_KEY}")
end
end
private
def hash_to_query(hash)
hash.keys.inject('') do |query_string, key|
- query_string << '&' unless key == hash.keys.first
- query_string << "#{URI.encode(key.to_s)}=#{URI.encode(hash[key])}"
+ query_string << '&' unless key == hash.keys.first
+ query_string << "#{URI.encode(key.to_s)}=#{URI.encode(hash[key])}"
end
end
end

0 comments on commit 78ba32d

Please sign in to comment.