appoxy-simple_record 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/results_array.rb +5 -0
- metadata +1 -1
data/lib/results_array.rb
CHANGED
@@ -20,6 +20,10 @@ module SimpleRecord
|
|
20
20
|
@items[i]
|
21
21
|
end
|
22
22
|
|
23
|
+
def first
|
24
|
+
@items[0] if @items.size > 0
|
25
|
+
end
|
26
|
+
|
23
27
|
def size
|
24
28
|
# puts 'SIZE count=' + @count.inspect
|
25
29
|
return @count if @count
|
@@ -63,6 +67,7 @@ module SimpleRecord
|
|
63
67
|
options[:next_token] = next_token
|
64
68
|
res = clz.find(*params)
|
65
69
|
@items = res.items
|
70
|
+
# todo: should append items here instead of replacing the array
|
66
71
|
@next_token = res.next_token
|
67
72
|
each(&blk)
|
68
73
|
end
|