scripts/DownloadFromOPUS.rb
## Net/IMAP class had to be extended, Just in Case(The authors RUBY did not have these methods)
Net/IMAP class had to be extended, Just in Case(The authors RUBY did not have these methods)
Net / IMAP class had to be extended Just in Case ( The authors RUBY did not have these methods )
def idle(&response_handler)
      raise LocalJumpError, "no block given" unless response_handler
      response = nil
      synchronize do
        tag = Thread.current[:net_imap_tag] = generate_tag
        put_string("#{tag} IDLE#{CRLF}")
        begin
          add_response_handler(response_handler)
          @idle_done_cond = new_cond
          @idle_done_cond.wait
          @idle_done_cond = nil
        ensure
          remove_response_handler(response_handler)
          put_string("DONE#{CRLF}")
          response = get_tagged_response(tag, true)
        end
      end
      return response
    end
def idle ( & response_handler ) raise LocalJumpError , "no block given" unless response_handler response = nil synchronize do tag = Thread . current [ :net_imap_tag ] = generate_tag put_string ( "#{tag} IDLE#{CRLF}" ) begin add_response_handler ( response_handler ) @idle_done_cond = new_cond @idle_done_cond . wait @idle_done_cond = nil ensure remove_response_handler ( response_handler ) put_string ( "DONE#{CRLF}" ) response = get_tagged_response ( tag , true ) end end return response end
Net/IMAP class had to be extended, Just in Case(The authors RUBY did not have these methods)
Net / IMAP class had to be extended Just in Case ( The authors RUBY did not have these methods )
response_handler
<not_specific>