Class: Twterm::Event::Notification::DirectMessage
- Inherits:
-
AbstractNotification
- Object
- AbstractEvent
- AbstractNotification
- Twterm::Event::Notification::DirectMessage
- Defined in:
- lib/twterm/event/notification/direct_message.rb
Instance Method Summary collapse
-
#body ⇒ String
Notification body.
-
#initialize(message, user) ⇒ DirectMessage
constructor
A new instance of DirectMessage.
-
#title ⇒ String
Notification title.
Methods inherited from AbstractNotification
Methods inherited from AbstractEvent
Methods included from Utils
Constructor Details
#initialize(message, user) ⇒ DirectMessage
Returns a new instance of DirectMessage.
9 10 11 12 |
# File 'lib/twterm/event/notification/direct_message.rb', line 9 def initialize(, user) @message = @user = user end |
Instance Method Details
#body ⇒ String
Returns notification body.
15 16 17 |
# File 'lib/twterm/event/notification/direct_message.rb', line 15 def body .text end |
#title ⇒ String
Returns notification title.
20 21 22 |
# File 'lib/twterm/event/notification/direct_message.rb', line 20 def title "@#{user.screen_name} has sent you a message" end |