From f07013ac3ceaacc63b89d409bfd9b4fc9eea98de Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 6 Nov 2016 16:39:05 +0100 Subject: [PATCH] Improved inline documentation. --- app/models/channel/driver/imap.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/models/channel/driver/imap.rb b/app/models/channel/driver/imap.rb index c0fc89b2e..e2afe5a0e 100644 --- a/app/models/channel/driver/imap.rb +++ b/app/models/channel/driver/imap.rb @@ -46,12 +46,23 @@ returns result: 'ok', # 'verify not ok' } +example + + params = { + host: 'outlook.office365.com', + user: 'xxx@znuny.onmicrosoft.com', + password: 'xxx', + } + channel = Channel.last + instance = Channel::Driver::Imap.new + result = instance.fetch(params, channel, 'verify') + =end def fetch (options, channel, check_type = '', verify_string = '') ssl = true port = 993 - if options.key?(:ssl) && options[:ssl].to_s == 'false' + if options.key?(:ssl) && options[:ssl] == false ssl = false port = 143 end