Allow options when executing batch requests (#48)

This commit is contained in:
Steven Bazyl committed 2013-05-13 15:19:25 -07:00
1 parent 794c6a90f7
commit aa7a254d23
2 files changed
+18 -4

No files matched your search

+3 -4
View File
@@ -542,10 +542,9 @@ module Google
#
# @see Google::APIClient#generate_request
def execute(*params)
if params.last.kind_of?(Google::APIClient::Request) &&
params.size == 1
request = params.pop
options = {}
if params.first.kind_of?(Google::APIClient::Request)
request = params.shift
options = params.shift || {}
else
# This block of code allows us to accept multiple parameter passing
# styles, and maintaining some backwards compatibility.