Class: Lazylead::Task::Alert

Inherits:
Object
  • Object
show all
Defined in:
lib/lazylead/task/alert.rb

Overview

Notify particular person about tickets based on pre-defined html template.

The task supports the following features:

- fetch issues from remote ticketing system by query
- prepare email based on predefined template (*.erb)
- send the required notifications pre-defined "addressee".

Instance Method Summary collapse

Constructor Details

#initialize(log = Log::NOTHING) ⇒ Alert

Returns a new instance of Alert.



46
47
48
# File 'lib/lazylead/task/alert.rb', line 46

def initialize(log = Log::NOTHING)
  @log = log
end

Instance Method Details

#run(sys, postman, opts) ⇒ Object



50
51
52
# File 'lib/lazylead/task/alert.rb', line 50

def run(sys, postman, opts)
  postman.send opts.merge(tickets: sys.issues(opts["sql"]))
end