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