Module: Aws::ClientPaging Private

Included in:
Client
Defined in:
lib/aws-sdk-core/client_paging.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.included(subclass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/aws-sdk-core/client_paging.rb', line 8

def self.included(subclass)

  subclass.add_plugin('Aws::Plugins::ResponsePaging')

  class << subclass

    def set_paginators(paginators)
      @paginators = case paginators
        when Paging::Provider then paginators
        when Hash then Paging::Provider.new(paginators)
        when String, Pathname then Paging::Provider.new(Aws.load_json(paginators))
        when nil then Paging::NullProvider.new
        else raise ArgumentError, 'invalid paginators'
      end
    end

    def paginators
      @paginators
    end

  end
end