Class: Aws::Waiters::Provider Private
- Inherits:
-
Object
- Object
- Aws::Waiters::Provider
- Defined in:
- lib/aws-sdk-core/waiters/provider.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.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(definitions) ⇒ Provider
constructor
private
A new instance of Provider.
- #waiter(waiter_name) ⇒ Waiter private
- #waiter_names ⇒ Array<Symbol> private
Constructor Details
#initialize(definitions) ⇒ Provider
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 Provider.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 6 def initialize(definitions) @waiters = {} definitions['waiters'].each do |waiter_name, definition| @waiters[Seahorse::Util.underscore(waiter_name).to_sym] = { poller: Poller.new(definition), max_attempts: definition['maxAttempts'], delay: definition['delay'], } end end |
Instance Method Details
#waiter(waiter_name) ⇒ Waiter
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.
25 26 27 28 29 30 31 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 25 def waiter(waiter_name) if @waiters.key?(waiter_name) Waiter.new(@waiters[waiter_name]) else raise Errors::NoSuchWaiterError.new(waiter_name, waiter_names) end end |
#waiter_names ⇒ Array<Symbol>
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.
18 19 20 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 18 def waiter_names @waiters.keys end |