Class: Aws::Pager Private
- Inherits:
- 
      Object
      
        - Object
- Aws::Pager
 
- Defined in:
- lib/aws-sdk-core/pager.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: NullPager
Instance Attribute Summary collapse
- #limit_key ⇒ Symbol? readonly private
- #tokens ⇒ Hash? readonly private
Instance Method Summary collapse
- 
  
    
      #initialize(options)  ⇒ Pager 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    A new instance of Pager. 
- #next_tokens(response) ⇒ Hash private
- #prev_tokens(response) ⇒ Object private
- #truncated?(response) ⇒ Boolean private
Constructor Details
#initialize(options) ⇒ Pager
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.
Returns a new instance of Pager.
| 12 13 14 15 16 | # File 'lib/aws-sdk-core/pager.rb', line 12 def initialize() @tokens = .fetch(:tokens) @limit_key = .fetch(:limit_key, nil) @more_results = .fetch(:more_results, nil) end | 
Instance Attribute Details
#limit_key ⇒ Symbol? (readonly)
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.
| 19 20 21 | # File 'lib/aws-sdk-core/pager.rb', line 19 def limit_key @limit_key end | 
#tokens ⇒ Hash? (readonly)
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.
| 22 23 24 | # File 'lib/aws-sdk-core/pager.rb', line 22 def tokens @tokens end | 
Instance Method Details
#next_tokens(response) ⇒ Hash
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.
| 26 27 28 29 30 31 | # File 'lib/aws-sdk-core/pager.rb', line 26 def next_tokens(response) @tokens.each.with_object({}) do |(source, target), next_tokens| value = JMESPath.search(source, response.data) next_tokens[target.to_sym] = value unless empty_value?(value) end end | 
#prev_tokens(response) ⇒ 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.
| 34 35 36 37 38 39 | # File 'lib/aws-sdk-core/pager.rb', line 34 def prev_tokens(response) @tokens.each.with_object({}) do |(_, target), tokens| value = JMESPath.search(target, response.context.params) tokens[target.to_sym] = value unless empty_value?(value) end end | 
#truncated?(response) ⇒ Boolean
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.
| 43 44 45 46 47 48 49 50 51 | # File 'lib/aws-sdk-core/pager.rb', line 43 def truncated?(response) if @more_results JMESPath.search(@more_results, response.data) else next_t = next_tokens(response) prev_t = prev_tokens(response) !(next_t.empty? || next_t == prev_t) end end |