Class: Redmine::Notifiable

Inherits:
Struct
  • Object
show all
Defined in:
lib/redmine/notifiable.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/redmine/notifiable.rb', line 4

def name
  @name
end

#parentObject

Returns the value of attribute parent

Returns:

  • (Object)

    the current value of parent



4
5
6
# File 'lib/redmine/notifiable.rb', line 4

def parent
  @parent
end

Class Method Details

.allObject

TODO: Plugin API for adding a new notification?



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/redmine/notifiable.rb', line 11

def self.all
  notifications = []
  notifications << Notifiable.new('issue_added')
  notifications << Notifiable.new('issue_updated')
  notifications << Notifiable.new('issue_note_added', 'issue_updated')
  notifications << Notifiable.new('issue_status_updated', 'issue_updated')
  notifications << Notifiable.new('issue_assigned_to_updated', 'issue_updated')
  notifications << Notifiable.new('issue_priority_updated', 'issue_updated')
  notifications << Notifiable.new('issue_fixed_version_updated', 'issue_updated')
  notifications << Notifiable.new('news_added')
  notifications << Notifiable.new('news_comment_added')
  notifications << Notifiable.new('document_added')
  notifications << Notifiable.new('file_added')
  notifications << Notifiable.new('message_posted')
  notifications << Notifiable.new('wiki_content_added')
  notifications << Notifiable.new('wiki_content_updated')
  notifications
end

Instance Method Details

#to_sObject



6
7
8
# File 'lib/redmine/notifiable.rb', line 6

def to_s
  name
end