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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account) ⇒ ConnectionTester

Returns a new instance of ConnectionTester.


7
8
9
# File 'lib/imap/backup/setup/connection_tester.rb', line 7

def initialize()
  @account = 
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.


5
6
7
# File 'lib/imap/backup/setup/connection_tester.rb', line 5

def 
  @account
end

Instance Method Details

#testObject


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

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