diff --git a/lib/twitch/collection.rb b/lib/twitch/collection.rb index b696ffd..ffeea3e 100644 --- a/lib/twitch/collection.rb +++ b/lib/twitch/collection.rb @@ -17,5 +17,17 @@ def initialize(data:, total:, cursor:) @total = total @cursor = cursor.nil? ? nil : cursor end + + def each(&block) + data.each(&block) + end + + def first + data.first + end + + def last + data.last + end end end