Class: NotifyApi::CompletedNzb
- Inherits:
-
Object
- Object
- NotifyApi::CompletedNzb
- Defined in:
- lib/notify/api/completed_nzb.rb
Overview
Announce that a file has been completed
Instance Attribute Summary (collapse)
Instance Method Summary (collapse)
-
- (CompletedNzb) initialize(notifier = NotifyLibNotify::LibNotify.new)
constructor
Set the notification library to use, defaults to libnotify.
-
- (String) process
Announce the job completion name with the name set in the class Returns the message announced.
Constructor Details
- (CompletedNzb) initialize(notifier = NotifyLibNotify::LibNotify.new)
Set the notification library to use, defaults to libnotify
18 19 20 |
# File 'lib/notify/api/completed_nzb.rb', line 18 def initialize(notifier = NotifyLibNotify::LibNotify.new) self.notifier = notifier end |
Instance Attribute Details
- (String) name
8 9 10 |
# File 'lib/notify/api/completed_nzb.rb', line 8 def name @name end |
- (NotifyLibNotify::LibNotify) notifier
14 15 16 |
# File 'lib/notify/api/completed_nzb.rb', line 14 def notifier @notifier end |
- (String) status
11 12 13 |
# File 'lib/notify/api/completed_nzb.rb', line 11 def status @status end |
Instance Method Details
- (String) process
Announce the job completion name with the name set in the class Returns the message announced
29 30 31 32 33 34 35 |
# File 'lib/notify/api/completed_nzb.rb', line 29 def process announce = "Job " + self.name + " " + self.status self.notifier.notify(announce) return announce end |