Class: FakeServer

Inherits:
Object
  • Object
show all
Defined in:
lib/imap-feeder/fakeserver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ FakeServer

Returns a new instance of FakeServer.



5
6
7
8
# File 'lib/imap-feeder/fakeserver.rb', line 5

def initialize(params)
  puts "Would connect to #{params[:host]}:#{params[:port]}, with ssl? #{params[:use_ssl]}"
  puts "Would login with #{params[:user]}/#{params[:pass]}"
end

Instance Attribute Details

#connectedObject (readonly)

Returns the value of attribute connected.



3
4
5
# File 'lib/imap-feeder/fakeserver.rb', line 3

def connected
  @connected
end

Instance Method Details

#create_folder(folder) ⇒ Object



17
18
# File 'lib/imap-feeder/fakeserver.rb', line 17

def create_folder(folder)
end

#disconnectObject



10
11
# File 'lib/imap-feeder/fakeserver.rb', line 10

def disconnect
end

#has_folder?(folder) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/imap-feeder/fakeserver.rb', line 20

def has_folder?(folder)
  true
end

#send(message, folder = "INBOX") ⇒ Object



13
14
15
# File 'lib/imap-feeder/fakeserver.rb', line 13

def send(message, folder="INBOX")
  puts "Send message to folder #{folder}: #{message.title}"
end