Class: Twterm::Event::Notification::Mention

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

Instance Method Summary collapse

Methods inherited from AbstractNotification

#fallback

Methods inherited from AbstractEvent

#fields

Methods included from Utils

check_type

Constructor Details

#initialize(status, user) ⇒ Mention

Returns a new instance of Mention.

Parameters:



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

#bodyString

Returns notification body.

Returns:

  • (String)

    notification body



15
16
17
# File 'lib/twterm/event/notification/mention.rb', line 15

def body
  status.text
end

#titleString

Returns notification title.

Returns:

  • (String)

    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

#urlString

Returns notification url.

Returns:

  • (String)

    notification url



25
26
27
# File 'lib/twterm/event/notification/mention.rb', line 25

def url
  status.url
end