Class: AddressFinder::V1::Email::BatchVerification
- Inherits:
-
Object
- Object
- AddressFinder::V1::Email::BatchVerification
- Defined in:
- lib/addressfinder/v1/email/batch_verification.rb
Instance Attribute Summary collapse
-
#emails ⇒ Object
readonly
Returns the value of attribute emails.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(emails:, http:, concurrency: 5, **args) ⇒ BatchVerification
constructor
Verifies an array of email addresses using concurrency to reduce the execution time.
- #perform ⇒ Object
Constructor Details
#initialize(emails:, http:, concurrency: 5, **args) ⇒ BatchVerification
Verifies an array of email addresses 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.
15 16 17 18 19 20 |
# File 'lib/addressfinder/v1/email/batch_verification.rb', line 15 def initialize(emails:, http:, concurrency: 5, **args) @emails = emails @concurrency = concurrency @http = http @args = args end |
Instance Attribute Details
#emails ⇒ Object (readonly)
Returns the value of attribute emails.
5 6 7 |
# File 'lib/addressfinder/v1/email/batch_verification.rb', line 5 def emails @emails end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/addressfinder/v1/email/batch_verification.rb', line 5 def results @results end |
Instance Method Details
#perform ⇒ Object
22 23 24 25 26 27 |
# File 'lib/addressfinder/v1/email/batch_verification.rb', line 22 def perform confirm_concurrency_level verify_each_email_concurrently self end |