lib/google/cloud/datastore/dataset/lookup_results.rb in google-cloud-datastore-0.24.2 vs lib/google/cloud/datastore/dataset/lookup_results.rb in google-cloud-datastore-1.0.0
- old
+ new
@@ -45,11 +45,11 @@
#
# tasks = datastore.find_all task_key1, task_key2, task_key3
# tasks.size #=> 3
# tasks.deferred #=> []
# tasks.missing #=> []
- # descriptions = tasks.map { |task| task["description"] }
+ # descriptions = tasks.map { |t| t["description"] }
# descriptions.size #=> 3
# descriptions.deferred #=> raise NoMethodError
# descriptions.missing #=> raise NoMethodError
#
class LookupResults < DelegateClass(::Array)
@@ -138,12 +138,12 @@
# datastore = Google::Cloud::Datastore.new
#
# task_key1 = datastore.key "Task", "sampleTask1"
# task_key2 = datastore.key "Task", "sampleTask2"
# tasks = datastore.find_all task_key1, task_key2
- # tasks.all do |task|
- # puts "Task #{task.key.id} (#cursor)"
+ # tasks.all do |t|
+ # puts "Task #{t.key.id} (#cursor)"
# end
#
# @example Using the enumerator by not passing a block:
# require "google/cloud/datastore"
#
@@ -160,11 +160,11 @@
# datastore = Google::Cloud::Datastore.new
#
# task_key1 = datastore.key "Task", "sampleTask1"
# task_key2 = datastore.key "Task", "sampleTask2"
# tasks = datastore.find_all task_key1, task_key2
- # tasks.all(request_limit: 10) do |task|
- # puts "Task #{task.key.id} (#cursor)"
+ # tasks.all(request_limit: 10) do |t|
+ # puts "Task #{t.key.id} (#cursor)"
# end
#
def all request_limit: nil
request_limit = request_limit.to_i if request_limit
unless block_given?