Class: Twterm::Event::Notification::ListMemberAdded

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

Instance Method Summary collapse

Methods inherited from AbstractNotification

#fallback

Methods inherited from AbstractEvent

#fields

Methods included from Utils

check_type

Constructor Details

#initialize(list) ⇒ ListMemberAdded

Returns a new instance of ListMemberAdded.

Parameters:



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

def initialize(list)
  @list = list
end

Instance Method Details

#bodyString

Returns notification body.

Returns:

  • (String)

    notification body



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

def body
  list.description
end

#titleString

Returns notification title.

Returns:

  • (String)

    notification title



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

def title
  "You've been added to #{list.full_name}"
end

#urlString

Returns notification url.

Returns:

  • (String)

    notification url



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

def url
  list.url
end