Skip to content

Commit 607b204

Browse files
committed
moved nil check to case
1 parent 8d638da commit 607b204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/spark_api/models/finders.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ module Finders
66

77
def find(*arguments)
88
scope = arguments.slice!(0)
9-
raise ArgumentError, "argument can't be nil" if scope.nil?
109
options = arguments.slice!(0) || {}
1110
case scope
11+
when nil then raise ArgumentError, "Argument for find() can't be nil"
1212
when :all then find_every(options)
1313
when :first then find_every(options).first
1414
when :last then find_every(options).last

0 commit comments

Comments
 (0)