Class: Pendaxes::Notificator
- Inherits:
-
Object
- Object
- Pendaxes::Notificator
show all
- Extended by:
- Defaults, Finder
- Includes:
- PendingManager
- Defined in:
- lib/pendaxes/notificator.rb,
lib/pendaxes/notificators/file.rb,
lib/pendaxes/notificators/mail.rb,
lib/pendaxes/notificators/terminal.rb
Defined Under Namespace
Classes: File, Mail, Terminal
Instance Method Summary
collapse
Methods included from Defaults
defaults
Methods included from Finder
announce, find, inherited
#add, #all_pendings, #pendings, #reset
Constructor Details
#initialize(config = {}) ⇒ Notificator
Returns a new instance of Notificator.
14
15
16
17
|
# File 'lib/pendaxes/notificator.rb', line 14
def initialize(config={})
@config = Hashr.new(self.class.defaults.merge(config))
@pendings = []
end
|
Instance Method Details
#notify ⇒ Object
19
20
|
# File 'lib/pendaxes/notificator.rb', line 19
def notify
end
|
#report_for(pendings) ⇒ Object
26
27
28
29
30
|
# File 'lib/pendaxes/notificator.rb', line 26
def report_for(pendings)
r = reporter.new({include_allowed: true}.merge(@config.reporter))
r.add pendings
r.report
end
|
#reporter ⇒ Object
22
23
24
|
# File 'lib/pendaxes/notificator.rb', line 22
def reporter
Reporter.find(@config.reporter.use.to_sym)
end
|