Method: POPServer#list
- Defined in:
- lib/pop_server.rb
#list(client, message) ⇒ Object
Shows list of messages
When a message id is specified only list the size of that message
62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/pop_server.rb', line 62 def list(client, ) if == :invalid respond(client, false, "Invalid message number.") elsif == :all = "" Store.instance.get.each.with_index do |, index| << "#{index + 1} #{.size}\r\n" end respond(client, true, "POP3 clients that break here, they violate STD53.\r\n#{}.") else = Store.instance.get[ - 1] respond(client, true, "#{} #{.size}") end end |