Class: Twterm::Event::Notification::Follow

Inherits:
AbstractNotification show all
Defined in:
lib/twterm/event/notification/follow.rb

Instance Method Summary collapse

Methods inherited from AbstractNotification

#fallback

Methods inherited from AbstractEvent

#fields

Methods included from Utils

check_type

Constructor Details

#initialize(user) ⇒ Follow

Returns a new instance of Follow.

Parameters:



8
9
10
# File 'lib/twterm/event/notification/follow.rb', line 8

def initialize(user)
  @user = user
end

Instance Method Details

#bodyString

Returns notification body.

Returns:

  • (String)

    notification body



13
14
15
# File 'lib/twterm/event/notification/follow.rb', line 13

def body
  user.description
end

#titleString

Returns notification title.

Returns:

  • (String)

    notification title



18
19
20
# File 'lib/twterm/event/notification/follow.rb', line 18

def title
  "@#{user.screen_name} has followed you"
end

#urlString

Returns notification url.

Returns:

  • (String)

    notification url



23
24
25
# File 'lib/twterm/event/notification/follow.rb', line 23

def url
  user.url
end