Class: Twterm::Event::Notification::Follow
- Inherits:
-
AbstractNotification
- Object
- AbstractEvent
- AbstractNotification
- Twterm::Event::Notification::Follow
- Defined in:
- lib/twterm/event/notification/follow.rb
Instance Method Summary collapse
-
#body ⇒ String
Notification body.
-
#initialize(user) ⇒ Follow
constructor
A new instance of Follow.
-
#title ⇒ String
Notification title.
-
#url ⇒ String
Notification url.
Methods inherited from AbstractNotification
Methods inherited from AbstractEvent
Methods included from Utils
Constructor Details
#initialize(user) ⇒ Follow
Returns a new instance of Follow.
8 9 10 |
# File 'lib/twterm/event/notification/follow.rb', line 8 def initialize(user) @user = user end |
Instance Method Details
#body ⇒ String
Returns notification body.
13 14 15 |
# File 'lib/twterm/event/notification/follow.rb', line 13 def body user.description end |
#title ⇒ String
Returns notification title.
18 19 20 |
# File 'lib/twterm/event/notification/follow.rb', line 18 def title "@#{user.screen_name} has followed you" end |
#url ⇒ String
Returns notification url.
23 24 25 |
# File 'lib/twterm/event/notification/follow.rb', line 23 def url user.url end |