Class: Imap::Backup::Setup::ConnectionTester
- Inherits:
-
Object
- Object
- Imap::Backup::Setup::ConnectionTester
- Defined in:
- lib/imap/backup/setup/connection_tester.rb
Instance Method Summary collapse
-
#initialize(account) ⇒ ConnectionTester
constructor
A new instance of ConnectionTester.
- #test ⇒ Object
Constructor Details
#initialize(account) ⇒ ConnectionTester
Returns a new instance of ConnectionTester.
9 10 11 |
# File 'lib/imap/backup/setup/connection_tester.rb', line 9 def initialize(account) @account = account end |
Instance Method Details
#test ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/imap/backup/setup/connection_tester.rb', line 13 def test account.client.login "Connection successful" rescue Net::IMAP::NoResponseError "No response" rescue StandardError => e "Unexpected error: #{e}" end |