Class: AddressFinder::V1::Phone::BatchVerification
- Inherits:
-
Object
- Object
- AddressFinder::V1::Phone::BatchVerification
- Defined in:
- lib/addressfinder/v1/phone/batch_verification.rb
Instance Attribute Summary collapse
-
#phone_numbers ⇒ Object
readonly
Returns the value of attribute phone_numbers.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(phone_numbers:, default_country_code:, http:, concurrency: 5, **args) ⇒ BatchVerification
constructor
Verifies an array of phone numbers using concurrency to reduce the execution time.
- #perform ⇒ Object
Constructor Details
#initialize(phone_numbers:, default_country_code:, http:, concurrency: 5, **args) ⇒ BatchVerification
Verifies an array of phone numbers using concurrency to reduce the execution time. The results of the verification are stored in the ‘results` attribute, in the same order in which they were supplied.
16 17 18 19 20 21 22 |
# File 'lib/addressfinder/v1/phone/batch_verification.rb', line 16 def initialize(phone_numbers:, default_country_code:, http:, concurrency: 5, **args) @phone_numbers = phone_numbers @concurrency = concurrency @default_country_code = default_country_code @http = http @args = args end |
Instance Attribute Details
#phone_numbers ⇒ Object (readonly)
Returns the value of attribute phone_numbers.
5 6 7 |
# File 'lib/addressfinder/v1/phone/batch_verification.rb', line 5 def phone_numbers @phone_numbers end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/addressfinder/v1/phone/batch_verification.rb', line 5 def results @results end |
Instance Method Details
#perform ⇒ Object
24 25 26 27 28 29 |
# File 'lib/addressfinder/v1/phone/batch_verification.rb', line 24 def perform confirm_concurrency_level verify_each_phone_number_concurrently self end |