Class: Apolo::Notifiers::Console
- Inherits:
-
Object
- Object
- Apolo::Notifiers::Console
- Defined in:
- lib/apolo/notifiers/console.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Console
constructor
A new instance of Console.
- #notify(monitor, message, value) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Console
Returns a new instance of Console.
6 7 8 |
# File 'lib/apolo/notifiers/console.rb', line 6 def initialize( = {}) @show_date = [:show_date] end |
Instance Method Details
#notify(monitor, message, value) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/apolo/notifiers/console.rb', line 10 def notify(monitor, , value) output = "#{monitor} #{} #{value}" unless @show_date.nil? output = "#{DateTime.now} #{output}" end puts output end |