Class: Netposti::Inbox
- Inherits:
-
Object
- Object
- Netposti::Inbox
- Defined in:
- lib/netposti/inbox.rb
Instance Method Summary collapse
-
#initialize(inbox) ⇒ Inbox
constructor
A new instance of Inbox.
- #last_message ⇒ Object
- #messages ⇒ Object
- #number_of_unread_messages ⇒ Object
- #unread_messages ⇒ Object
Constructor Details
#initialize(inbox) ⇒ Inbox
Returns a new instance of Inbox.
6 7 8 |
# File 'lib/netposti/inbox.rb', line 6 def initialize(inbox) @inbox = inbox end |
Instance Method Details
#last_message ⇒ Object
22 23 24 |
# File 'lib/netposti/inbox.rb', line 22 def .first(1).first end |
#messages ⇒ Object
14 15 16 |
# File 'lib/netposti/inbox.rb', line 14 def ||= @inbox.links_with(:href => /(.*?)listview(.*?)openMessage$/).lazy.map { || Message.new(.click) } end |
#number_of_unread_messages ⇒ Object
10 11 12 |
# File 'lib/netposti/inbox.rb', line 10 def @inbox.search('.unread').count end |
#unread_messages ⇒ Object
18 19 20 |
# File 'lib/netposti/inbox.rb', line 18 def .first() end |