Class: FakeServer
- Inherits:
-
Object
- Object
- FakeServer
- Defined in:
- lib/imap-feeder/fakeserver.rb
Instance Attribute Summary collapse
-
#connected ⇒ Object
readonly
Returns the value of attribute connected.
Instance Method Summary collapse
- #create_folder(folder) ⇒ Object
- #disconnect ⇒ Object
- #has_folder?(folder) ⇒ Boolean
-
#initialize(params) ⇒ FakeServer
constructor
A new instance of FakeServer.
- #send(message, folder = "INBOX") ⇒ Object
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
#connected ⇒ Object (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 |
#disconnect ⇒ Object
10 11 |
# File 'lib/imap-feeder/fakeserver.rb', line 10 def disconnect end |
#has_folder?(folder) ⇒ 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(, folder="INBOX") puts "Send message to folder #{folder}: #{.title}" end |