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.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 8 def initialize(definitions) @waiter_names = Set.new @definitions = definitions['waiters'].each.with_object({}) do |(k,v),h| if k.match(/^__/) h[k] = v else underscore(k).to_sym.tap do |name| @waiter_names << name h[name] = v end end 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.
30 31 32 33 34 35 36 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 30 def waiter(waiter_name) if @waiter_names.include?(waiter_name) Waiter.new(resolve('extends' => waiter_name)) else raise Errors::NoSuchWaiter.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.
23 24 25 |
# File 'lib/aws-sdk-core/waiters/provider.rb', line 23 def waiter_names @waiter_names.to_a end |