Class: PoolRelatedIterator
- Inherits:
-
Object
- Object
- PoolRelatedIterator
- Includes:
- Enumerable
- Defined in:
- lib/warden/cognito/pool_related_iterator.rb
Instance Attribute Summary collapse
-
#factory ⇒ Object
readonly
Returns the value of attribute factory.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(&factory) ⇒ PoolRelatedIterator
constructor
A new instance of PoolRelatedIterator.
Constructor Details
#initialize(&factory) ⇒ PoolRelatedIterator
6 7 8 |
# File 'lib/warden/cognito/pool_related_iterator.rb', line 6 def initialize(&factory) @factory = factory end |
Instance Attribute Details
#factory ⇒ Object (readonly)
Returns the value of attribute factory.
4 5 6 |
# File 'lib/warden/cognito/pool_related_iterator.rb', line 4 def factory @factory end |
Instance Method Details
#each(&block) ⇒ Object
10 11 12 13 14 |
# File 'lib/warden/cognito/pool_related_iterator.rb', line 10 def each(&block) Warden::Cognito.config.user_pools.each do |pool| block.call factory.call(pool) end end |