Class: Imap::Backup::Setup::ConnectionTester

Inherits:
Object
  • Object
show all
Defined in:
lib/imap/backup/setup/connection_tester.rb

Instance Method Summary collapse

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 = 
end

Instance Method Details

#testObject



13
14
15
16
17
18
19
20
# File 'lib/imap/backup/setup/connection_tester.rb', line 13

def test
  .client.
  "Connection successful"
rescue Net::IMAP::NoResponseError
  "No response"
rescue StandardError => e
  "Unexpected error: #{e}"
end