Skip to content
Browse files

Eliminate params variable

  • Loading branch information...
1 parent e02bdab commit 89b25eb65b290afca6dc87418cec27c330bf1dc7 @timcraft timcraft committed Sep 30, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/gocardless/resource.rb
View
3 lib/gocardless/resource.rb
@@ -24,8 +24,7 @@ def initialize(hash = {})
# look up the resource class with that name
class_name = Utils.camelize(Utils.singularize(name.to_s))
klass = GoCardless.const_get(class_name)
- params = args.first || {}
- query = default_query.merge(params)
+ query = default_query.merge(args.first || {})
client.api_get(path, query).map do |attrs|
# Convert the results to instances of the looked-up class
klass.new(attrs).tap { |m| m.client = client }

0 comments on commit 89b25eb

Please sign in to comment.
Something went wrong with that request. Please try again.