Permalink
Browse files

updating the endpoint for COL

  • Loading branch information...
1 parent 8c74816 commit 520a214e013417de968cc8b48c52b767ae9a2bb2 @patrickdavey patrickdavey committed Oct 10, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/catalogue_of_life.rb
@@ -4,7 +4,7 @@
# You have been warned.
#
class CatalogueOfLife
- ENDPOINT = 'http://www.catalogueoflife.org/annual-checklist/2010/webservice'.freeze
+ ENDPOINT = 'http://www.catalogueoflife.org/annual-checklist/webservice'.freeze
attr_reader :timeout
@@ -34,8 +34,8 @@ def request(method, args = {})
end
def method_missing(method, *args)
- params = *args
- unless params.is_a? Hash and not params.empty?
+ params = args.try(:first)
+ unless params.is_a?(Hash) && !params.blank?
raise "Catalogue of Life arguments must be a Hash"
end
request(method, *args)

0 comments on commit 520a214

Please sign in to comment.