Class: Discuss::Mailbox
- Inherits:
-
Object
- Object
- Discuss::Mailbox
- Defined in:
- app/models/discuss/mailbox.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #drafts ⇒ Object
- #empty_trash! ⇒ Object
- #inbox ⇒ Object
-
#initialize(user) ⇒ Mailbox
constructor
A new instance of Mailbox.
- #outbox ⇒ Object
- #trash ⇒ Object
Constructor Details
permalink #initialize(user) ⇒ Mailbox
Returns a new instance of Mailbox.
7 8 9 |
# File 'app/models/discuss/mailbox.rb', line 7 def initialize(user) @user = user end |
Instance Attribute Details
permalink #user ⇒ Object
Returns the value of attribute user.
5 6 7 |
# File 'app/models/discuss/mailbox.rb', line 5 def user @user end |
Instance Method Details
permalink #drafts ⇒ Object
[View source]
19 20 21 |
# File 'app/models/discuss/mailbox.rb', line 19 def drafts Message.drafts(user) end |
permalink #empty_trash! ⇒ Object
[View source]
27 28 29 |
# File 'app/models/discuss/mailbox.rb', line 27 def empty_trash! trash.each { || .delete! } end |
permalink #inbox ⇒ Object
[View source]
11 12 13 |
# File 'app/models/discuss/mailbox.rb', line 11 def inbox Message.inbox(user) end |
permalink #outbox ⇒ Object
[View source]
15 16 17 |
# File 'app/models/discuss/mailbox.rb', line 15 def outbox Message.outbox(user) end |
permalink #trash ⇒ Object
[View source]
23 24 25 |
# File 'app/models/discuss/mailbox.rb', line 23 def trash Message.trash(user) end |