d598e4fd93
Enables frozen for the following: * lib/*.rb * lib/banzai/**/*.rb * lib/bitbucket/**/*.rb * lib/constraints/**/*.rb * lib/container_registry/**/*.rb * lib/declarative_policy/**/*.rb Partially addresses #47424.
23 lines
503 B
Ruby
23 lines
503 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Bitbucket
|
|
class Collection < Enumerator
|
|
def initialize(paginator)
|
|
super() do |yielder|
|
|
loop do
|
|
paginator.items.each { |item| yielder << item }
|
|
end
|
|
end
|
|
|
|
lazy
|
|
end
|
|
|
|
def method_missing(method, *args)
|
|
return super unless self.respond_to?(method)
|
|
|
|
self.__send__(method, *args) do |item| # rubocop:disable GitlabSecurity/PublicSend
|
|
block_given? ? yield(item) : item
|
|
end
|
|
end
|
|
end
|
|
end
|