Permalink
Browse files

Whitespace clean up

  • Loading branch information...
sideshowbandana committed Apr 6, 2012
1 parent 74fa3b5 commit 1c2e7ae848630c82d36ad7d0f2d58eca3217bab0
Showing with 23 additions and 23 deletions.
  1. +23 −23 lib/brewerydb.rb
View
@@ -13,75 +13,75 @@ class BreweryDb
format :json
default_params :format => 'JSON'
@@apikey = nil
-
+
def self.search(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/search", :query => options)
Hashie::Mash.new(response['results']) if response.code == 200
end
-
+
def self.breweries(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/breweries", :query => options)
Hashie::Mash.new(response['breweries']) if response.code == 200
end
-
+
def self.brewery(id, options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/breweries/#{id}", :query => options)
Hashie::Mash.new(response['breweries']['brewery']) if response.code == 200
end
-
+
def self.beers(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/beers", :query => options)
Hashie::Mash.new(response['beers']) if response.code == 200
end
-
+
def self.beer(id, options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/beers/#{id}", :query => options)
Hashie::Mash.new(response['beers']['beer']) if response.code == 200
end
-
+
def self.styles(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/styles", :query => options)
Hashie::Mash.new(response['styles']) if response.code == 200
end
-
+
def self.style(id, options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/styles/#{id}", :query => options)
Hashie::Mash.new(response['styles']['style']) if response.code == 200
end
-
+
def self.categories(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/categories", :query => options)
Hashie::Mash.new(response['categories']) if response.code == 200
end
@@ -90,16 +90,16 @@ def self.category(id, options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/categories/#{id}", :query => options)
Hashie::Mash.new(response['categories']['category']) if response.code == 200
end
-
+
def self.glassware(options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/glassware", :query => options)
Hashie::Mash.new(response['glassware']) if response.code == 200
end
@@ -108,22 +108,22 @@ def self.glass(id, options={})
options.merge!({
:apikey => apikey
})
-
+
response = get("/glassware/#{id}", :query => options)
Hashie::Mash.new(response['glassware']['glass']) if response.code == 200
end
-
+
def self.apikey
@@apikey
end
def self.apikey=(apikey)
@@apikey = apikey
end
-
+
def self.configure
yield self
end
-
+
end

0 comments on commit 1c2e7ae

Please sign in to comment.